How to create fixed footer in android layout?

The answer selected as correct is faulty, the button will hide the lower part of the list view. The correct way is to declare the button first and position the list above the button.

<Button android:id="@+id/btnGetMoreResults"
   android:layout_height="wrap_content" 
   android:layout_width="wrap_content"     
   android:text="Get more"
   android:layout_alignParentBottom="true"/>

<ListView 
   ...
   android:layout_above="@id/btnGetMoreResults"/>

Leave a Comment