I have a layout with 3 buttons at the top, and then a ListView, and then a button below the list. This is my layout.xml file
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/btn_top10" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TOP 10"/> <Button android:id="@+id/btn_top100" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TOP 100" android:layout_toRightOf="@id/btn_top10"/> <Button android:id="@+id/btn_showAll" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Show All" android:layout_toRightOf="@id/btn_top100"/> <ListView android:id="@+id/LV_Device" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/btn_top10" android:layout_above="@id/LV_Device"/> <Button android:id="@+id/btn_clearResult" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Clear Results" android:layout_below="@id/LV_Device"/> </RelativeLayout>
This will produce a result similar to this.

If I add some values ββto the ListView, then it will be fine, the button below will be shown

But if the list is larger than the screen size, then the button below this will not be visible even after scrolling at the bottom of the list

How to solve this problem? I do not want the button to be fixed at the bottom of the screen. I want the button to appear only at the end of the ListView
android android-layout listview
Shijilal
source share