Omid's Blog

Linear layout: weight

If you set the height of widgets to 0 pixles, and then use percent numbers on widget weights, the space will be divided by percentages between the widgets.

 

<Button

android:layout_width=”fill_parent”

android:layout_height=”0dip”

android:layout_weight=”50″

android:text=”@string/fifty_percent”/>

/>

Posted July 3, 2014

Omid Hezaveh lives and works in Helsinki find him on twitter