How to create this kind of layout for android -
i have design of andorid layout have no idea how start ui use (grid, table layout or ). please give me example. here design!
one way nested linearlayouts:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="2" android:background="#dddddd" > <linearlayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="3" android:gravity="center" > <imagebutton android:layout_width="100dp" android:layout_height="100dp" android:background="#ff4000" /> </linearlayout> <linearlayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:gravity="center" > <textview android:layout_width="100dp" android:layout_height="100dp" android:textcolor="#000000" android:text="text here text here text here text here text here text here text here text here text here"/> </linearlayout> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="3" android:orientation="vertical" android:background="#cccccc" > <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" > <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:layout_margin="5dp" android:background="#ff8000" /> <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="3" android:layout_margin="5dp" android:background="#ffbf00" /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" > <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:layout_margin="5dp" android:background="#ff4000" /> <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:layout_margin="5dp" android:background="#facc2e" /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" > <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:layout_margin="5dp" android:background="#ffbf00" /> <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:layout_margin="5dp" android:background="#ff8000" /> <imagebutton android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:layout_margin="5dp" android:background="#ffbf00" /> </linearlayout> </linearlayout> </linearlayout>
Comments
Post a Comment