Split Screen In Two
I am trying to split my layout into two halves.When I try layout_weight,in splits it into two horizontal halves.How do i split the layout into two vertical halves.
Solution 1:
Use 'orientation="vertical"' in the enclosing layout, and apply your weights to the children such as:
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_gravity="fill"android:layout_height="fill_parent"android:layout_width="fill_parent"android:weightSum="1.0"android:orientation="vertical"android:padding="5dp"><TopChildViewandroid:layout_height="0dp"android:layout_weight="0.5".../><BottomChildViewandroid:layout_height="0dp"android:layout_weight="0.5".../>
Post a Comment for "Split Screen In Two"