Skip to content Skip to sidebar Skip to footer

Buttons Not Displaying In Linear Layout

Hi all my need is that buttons must show at bottom, so my code as

Solution 1:

LinearLayout is giving ListView all the space it needs, because it considers its children sequentially and doesn't take into account those that follow.

My suggestion is to use RelativeLayout.

<RelativeLayout...><ListView...android:id="@+id/list"android:layout_alignParentTop="true"/><LinearLayout...android:layout_below="@id/list"android:layout_alignParentBottom="true">
     ...buttons...
  </LinearLayout></RelativeLayout>

Solution 2:

I am not sure. But you may try to set the weight of your listview.

<ListViewandroid:id="@+id/list_multiselectable"android:layout_width="fill_parent"android:layout_height="fill_parent"android:layout_weight="1"android:layout_gravity="center_vertical"></ListView>

Solution 3:

You can set the minimumheight of listview e.g. 320*480 listview height = 430 button's layout height = 50

Post a Comment for "Buttons Not Displaying In Linear Layout"