Android: LinearLayout布局和其嵌套运用举例
来源:互联网 发布:淘宝客服业绩软件 编辑:程序博客网 时间:2024/06/05 14:09
==========================
main.xml
看mars老师的视频学习安卓里面的布局部分,做的样例,显摆一下,全部都是在main.xml里面配置的。
==========================
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:orientation="horizontal" >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:background="#0000aa"
- android:gravity="center_vertical"
- android:text="@string/hello"
- android:textSize="30dp" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:background="#00aa00"
- android:gravity="center_vertical"
- android:text="@string/hello"
- android:textSize="30dp" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:background="#0000aa"
- android:gravity="center_vertical"
- android:text="@string/hello"
- android:textSize="30dp" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:background="#00aa00"
- android:gravity="center_vertical"
- android:text="@string/hello"
- android:textSize="30dp" />
- </LinearLayout>
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="#00aa00"
- android:gravity="center_horizontal"
- android:text="@string/hello"
- android:textSize="30dp" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="#0000aa"
- android:gravity="center_horizontal"
- android:text="@string/hello"
- android:textSize="30dp" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="#00aa00"
- android:gravity="center_horizontal"
- android:text="@string/hello"
- android:textSize="30dp" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="#0000aa"
- android:gravity="center_horizontal"
- android:text="@string/hello"
- android:textSize="30dp" />
- </LinearLayout>
- </LinearLayout>
0 0
- Android:LinearLayout布局和其嵌套运用举例
- Android: LinearLayout布局和其嵌套运用举例
- android LinearLayout布局嵌套覆盖问题
- android LinearLayout布局嵌套覆盖问题
- Android布局LinearLayout的嵌套使用
- Android Studio App LinearLayout多层布局嵌套
- android LinearLayout布局嵌套覆盖问题
- Android Studio App LinearLayout多层布局嵌套
- android布局 LinearLayout和RelativeLayout
- Android学习 - LinearLayout布局和RelativeLayout布局
- Android布局之LinearLayout与TableLayout的嵌套使用
- Android LinearLayout布局嵌套及权重weight的使用
- 初入android之LinearLayout嵌套线性布局
- Android应用的LinearLayout中嵌套RelativeLayout的布局用法
- Android:LinearLayout简单嵌套布局+创建一个Activity+传值
- android LinearLayout和RelativeLayout实现精确布局
- android LinearLayout和RelativeLayout实现精确布局
- android LinearLayout和RelativeLayout实现精确布局
- RMAN-07540: Cleanup is required for the VPC user schema
- 第七周项目4 - 队列数组
- AE10.0开发时 System.ComponentModel.LicenseException' occurred in system.windows.forms.dll
- 第八周 项目4-字符串加密
- 九度OJ 1091:棋盘游戏 (DP、BFS、DFS、剪枝)
- Android: LinearLayout布局和其嵌套运用举例
- github 远程仓库
- 第七周项目5--排队看病模拟
- PHP开发环境思考
- IOS绘图
- 第八周项目2-建立链串的算法库
- 1021. 个位数统计 (15)
- 第7周项目2 - 建立链队算法库
- 第7周 项目1-建立顺序环形队列算法库