How to split an Android XML into three equal layout rectangles? -
how split android xml view 3 equal layout rectangles image below?
you want use vertical linearlayout, this:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:weightsum="3" > <framelayout android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:background="#ff0000" > </framelayout> <framelayout android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:background="#00ff00" > </framelayout> <framelayout android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:background="#0000ff" > </framelayout> </linearlayout>
Comments
Post a Comment