<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
style="@style/listbag">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp">
<ListView
android:id="@+id/groupListView"
style="@style/listbag"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="100"
android:listSelector="@drawable/list_selector1"
android:background="@drawable/radius" />
</LinearLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp">
<Button
android:id="@+id/addfrendstogroupButton"
android:layout_width="fill_parent"
android:layout_height="42dp"
android:text="Create new group"
android:textColor="@color/gray2"
android:background="@drawable/button_indicator"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="1dp"
android:layout_alignParentBottom="true"
/>
</RelativeLayout>
</LinearLayout>
I want to set listview and in the bottom of the screen one button. But when I fill listView the button not appear any more. I don’t know why. Could anyone help me here?
Have your listview and button be in a single relative layout. And give your button the property of
alignparentbottom. The button will always be above the list even if your listview is full and needs scrolling.Hope this helps.