aspose file tools
The moose likes Android and the fly likes How to add button at the end of the screen (after the ListView) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "How to add button at the end of the screen (after the ListView)" Watch "How to add button at the end of the screen (after the ListView)" New topic
Author

How to add button at the end of the screen (after the ListView)

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 178
Hi

How can I a button at the end of the screen (after the ListView)
What layout should I use ?

Thanks
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1365

There are many ways to do this;

1. Assuming that you have only a ListView and a button to display in your activity. Say you use LinearLayout; you can set the layout_weight of the ListView to "1" and then have the button below the ListView.
2. If you are using RelativeLayout you can use align_parentBottom property to place the button at the bottom of its parent


[List of FAQs] | [Android FAQ] | [My Blog] | [Samuh Varta]
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 178
Sorry but I don’t understand how to have the button the ListView ?
Can you please show example

My main.xml:



chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 178
Sorry but I don’t understand how to have the button the ListView ?
Can you please show example

My main.xml:



chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 178
Thanks

I got it
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to add button at the end of the screen (after the ListView)
 
Similar Threads
ListActivity
ListView and GUI decorate ?
list view problem
How to Refresh ListView in Android
Floating view below ListView