Monday, September 2, 2013

Android Tutorial: Building a Simple User Interface


Today is the first day of my Android Tutorial Journey, I do believe the more I learn through Android Tutorial, the quicker I will leave my current company.

After Reading through this article, One thing caught my eyes, layout_weight.

I used this attributes a lot in my application, but I have never understood it well like I do today, now.



  1. The default weight for all views is 0.
  2. If you specify any weight value greater than 0 to only one view, then that view fills whatever space remains after all views are given the space they require.
So this could be the easiest way to have a button at the rightmost place of the screen, or have the button at the bottom of the view, while the ListView above it could have as much of space as it could take. In this case, developer do not need a RelativeLayout to implement this purpose.


No comments :

Post a Comment