This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
chen young
Ranch Hand
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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

Thanks
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
chen young
Ranch Hand
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

I got it
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic