How do I make elements in a layout occupy 50, 25, 10, etc. percent of the horizontal/vertical space available?
Asked
Active
Viewed 5,251 times
1 Answers
15
You could achieve this with something like that : ( for vertical here )
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:weightSum="100">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="60">
</LinearLayout>
</LinearLayout>`

louiscoquio
- 10,638
- 3
- 33
- 51