*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
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: 188
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: 1369
    
    1

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] | [Samuh Varta]
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 188
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: 188
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: 188
Thanks

I got it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add button at the end of the screen (after the ListView)
 
Similar Threads
Floating view below ListView
list view problem
How to Refresh ListView in Android
ListActivity
ListView and GUI decorate ?