0

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

Ronak Mehta
  • 5,971
  • 5
  • 42
  • 69

2 Answers2

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