Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to handle different screen sizes  RSS feed

 
sam liya
Ranch Hand
Posts: 1254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my xml file which contain two buttons.I need these two button to take whole space vertically when the app is running.This is working fine in my phone.But if i use large screen phones this is not working fine.how to reslve this ?

 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The buttons' height are set to wrap_content. What does that do? Why is that wrong? What should t be instead?
 
sam liya
Ranch Hand
Posts: 1254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tnx steve.I change it to match_parent.anyway buttons doesn't fill full space horizontally also.please advice.
 
ab singh
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use weight and height as match parent. Hope it was helpful,



 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!