android 布局 LinearLayout
<?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" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="0dp"
android:layout_height="83dp"
android:layout_weight="1"
android:background="#ccc"
android:gravity="top|left"
android:text="linear btn1"
/>
<TextView
android:layout_width="0dp"
android:layout_height="83dp"
android:layout_weight="1"
android:background="#bbb"
android:gravity="top|left"
android:text="linear btn2"
/>
<TextView
android:layout_width="0dp"
android:layout_height="83dp"
android:layout_weight="1"
android:background="#aaa"
android:gravity="top|left"
android:text="linear btn3"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="5"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="#aaa"
android:gravity="top|left"
android:text="linear btn4"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="#bbb"
android:gravity="top|left"
android:text="linear btn5"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="#ccc"
android:gravity="top|left"
android:text="linear btn6"
/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="linear btn7"
/>
</LinearLayout>
</LinearLayout>
更多相关文章
- android LinearLayout布局
- 相对布局练习
- 线性布局练习
- android 布局 GridLayout
- Android学习之自定义控件之图片带文字的View
- Android 系列 6.30将具有圆角的边框添加到布局
- Android与WebView本地上传图片问题
- Android 中,应用程序需要的图片资源如何针对不同屏幕大小手机设计