I don\'t understand how to use this attribute. Can anyone tell me more about it?
As the name suggests, Layout weight specifies what amount or percentage of space a particular field or widget should occupy the screen space.
If we specify weight in horizontal orientation, then we must specify layout_width = 0px
.
Similarly, If we specify weight in vertical orientation, then we must specify layout_height = 0px
.