• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do alignment of controls in linear or list layout ?

 
Kacee Saxena
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Techeis,

I am new to android, currently designing a User Home Page. I am not able to get to "extreme right/left" i.e. 4 corners of screen.Also, please let me know how to align UI controls like - Button , EditText, etc to left/right/center in Linear and List Layout. button code eg.



These thigns are possible in Relative Layout using "android:layout_alignParent<left/right>" , but i was just wondering if tehre is any way to define these basic alignment in other layouts.

Thanks in advance,
Kacee
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
every control in a LinearLayout has a property android:layout_gravity use that you align your controls.
 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What arguments does this take ?
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sajjad Dar wrote:What arguments does this take ?

I am sure the official documentation will have this covered.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic