• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to put layout in middle of the screen?

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

How can I cause to the LinearLayout to be placed in the middle of the screen and not at the top ?

Thanks




 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try android:gravity="center_vertical" on the LinearLayout...

[Edit] Since your buttons don't fill up the horizontal space, you'll need to align to center both vertically and horizontally. Try this: android:gravity="center|center_vertical"
 
chen young
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is working for me ...



Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic