user275788
user275788

Reputation: 833

Layout :How to get the bottom bar under listview

I hope can get the layout like this:

-----Search bar(EditTextview)---

-----Listview(Rows)--------

-----Bottom bar(Contain many buttons)---

Pls give many samples Thanks very much I paste my xml file here.Pls help me check it:

Upvotes: 0

Views: 2353

Answers (2)

Praveen
Praveen

Reputation: 91205

within your linearlayout, use Relativelayout for each edittext,listview and footer.

in footer layout set android:orientation="horizontal" it works.

Upvotes: 2

yanchenko
yanchenko

Reputation: 57216

Here's a layout from one of my apps, should be enough to get you started:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:orientation="vertical">

    <ListView
        android:id="@+id/list_view"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="60dp"
        android:layout_weight="0"
        android:gravity="bottom">
<!-- Buttons go here -->
    </LinearLayout>

</LinearLayout>

Search for layout_weight to get an idea of how it works.

Upvotes: 4

Related Questions