i want to create button at the end of ListView means at the Footer that remain with the View but when listview scrolls down it must remain static at te end of view in android. look at my code Here
Asked
Active
Viewed 230 times
0
-
Have you tried enclosing a ListView and a Button inside a Layout? – Raoul George Feb 07 '12 at 13:35
2 Answers
1
In the List view using the two layout one is using for the button and other is using the Listview.this is the solution for button remain static.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
</ListView>

Nitesh Khosla
- 875
- 8
- 20
-
i tried it already when i drag listview it is invisible andwhen i reied to layout_width="fill_parent" it is not showing properly – Ronak Mehta Feb 07 '12 at 13:48
0
Use Relative layout to enclose your Listview and your button. In button use attribute alignParentBottom=true...

Relsell
- 771
- 6
- 18
-
-
IN the layout by Nitesh ... enclose your listview and button inside relative layout. make layout_height for listview as wrap_content instead of fill_parent. – Relsell Feb 07 '12 at 14:23