安卓学习:(4)安卓LinearLayout布局
来源:互联网 发布:js控制input不能输入 编辑:程序博客网 时间:2024/05/22 03:03
1.布局代码
<?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" > <LinearLayoutandroid:orientation="horizontal"android:layout_width="fill_parent"android:layout_height="fill_parent"android:layout_weight="8"><TextView android:text="red" android:gravity="left" android:background="#aa0000" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="2"/><TextView android:text="green" android:gravity="center_horizontal|center_vertical" android:background="#00aa00" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="3"/><TextView android:text="blue" android:gravity="right|bottom" android:background="#0000aa" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="4"/><TextView android:text="yellow" android:gravity="center_horizontal|bottom" android:background="#aaaa00" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="4"/> </LinearLayout> <LinearLayoutandroid:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"android:layout_weight="3"><TextView android:text="row one" android:background="#a30000" android:gravity="right|top" android:textSize="15pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="3"/><TextView android:text="row two" android:background="#00aa00" android:gravity="center_vertical|center_horizontal" android:textSize="15pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="2"/><TextView android:text="row three" android:background="#0000aa" android:gravity="left|bottom" android:textSize="15pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"/><TextView android:text="row four" android:background="#aa00aa" android:textSize="15pt" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"/> </LinearLayout> </LinearLayout>
2.布局效果
1 0
- 安卓学习:(4)安卓LinearLayout布局
- 安卓LinearLayout布局
- 安卓LinearLayout布局问题
- 安卓布局 - 线性布局(LinearLayout)
- 安卓布局基础笔记(LinearLayout -- 线性布局 )
- 安卓布局之线性布局(Linearlayout)
- 安卓六大布局之 线性布局(LinearLayout)
- 安卓学习之控件布局LinearLayout示例
- 安卓笔记1-LinearLayout(线性布局)
- 安卓布局:线性布局(Linearlayout)和相对布局(RelativeLayout)
- 安卓布局学习
- 安卓开发06:布局-线性布局 LinearLayout
- 安卓开发06:布局-线性布局 LinearLayout
- 【安卓篇】安卓六大布局【一】:LinearLayout布局
- 安卓入门【linearlayout线性布局,Tablelayput表格布局】
- 安卓学习笔记(LinearLayout属性android:orientation)
- 安卓学习(textview+LinearLayout实现导航栏)
- 安卓学习第三弹--关于布局文件LinearLayout和RelativeLayout的那点事
- C++通过DLL调用C#代码
- asp.net生成二维码
- 获取android手机基本信息
- Unity3d热更新(二):资源打包AssetBundle
- python link to Orcal
- 安卓学习:(4)安卓LinearLayout布局
- Java编程思想学习心得(六)关系操作符的陷阱
- Unity3d热更新(三):更新资源流程
- JS横向延时2级下拉菜单
- 序列化和反序列化,怎么保证数据的正确性
- 日期、时间、星期
- C++通过DLL调用C#代码
- 自动垂直滚动(autoText)
- hdoj 5311 Hidden String 【dfs】