Linear Layout Height and Weight

magicfire

New Member
I have the following\[code\]<linearLayout><RelativeLayout> <!-- Header --></RelativeLayout><linearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="6"> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1"> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1"> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1"> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1"> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1"> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1"> </LinearLayout></linearLayout>\[/code\]However the layouts are not assuming to fill the height properly I wish to for the desired effect of one linearLayout below another and to take up 1/6th of the parent space.Instead it seems to be applying the weight to the width of the element.What is the correct method to assume percentage height in Android? Width seems to be a breeze with Weight but I can't seem to get it correct on Height.
 
Back
Top