Android ApiDemos示例解析(141):Views->Layouts->LinearLayout->1. Vertical
来源:互联网 发布:推广软件 编辑:程序博客网 时间:2024/04/29 04:52
LinearLayout 将其子View顺序排成一行或是一列,一个垂直列表每行将只有一个子元素(无论它们有多宽),一个水平列表只是一列的高度(最高子元素的高度来填充)。
本例介绍了LinearLayout 的基本用法,LinearLayout的方向可以使用android:orientation 来定义,可以指定vertical 或是 horizontal ,缺省为横向horizontal。
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:orientation=”vertical”
android:background=”@drawable/blue”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”>
<!– view1 goes on top –>
<TextView
android:background=”@drawable/box”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:text=”@string/linear_layout_1_top”/>
<!– view2 goes in the middle –>
<TextView
android:background=”@drawable/box”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:text=”@string/linear_layout_1_middle”/>
<!– view3 goes on the bottom –>
<TextView
android:background=”@drawable/box”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:text=”@string/linear_layout_1_bottom”/>
</LinearLayout>
- Android ApiDemos示例解析(141):Views->Layouts->LinearLayout->1. Vertical
- Android ApiDemos示例解析(151):Views->Layouts->RelativeLayout->1. Vertical
- Android ApiDemos示例解析(142):Views->Layouts->LinearLayout->2. Vertical (Fill Screen)
- Android ApiDemos示例解析(143):Views->Layouts->LinearLayout->3. Vertical (Padded)
- Android ApiDemos示例解析(144):Views->Layouts->LinearLayout->4. Horizontal
- Android ApiDemos示例解析(148):Views->Layouts->LinearLayout->8. Gravity
- Android ApiDemos示例解析(133):Views->Layouts->Baseline->1.Top
- Android ApiDemos示例解析(153):Views->Layouts->ScrollView->1.Short
- Android ApiDemos示例解析(115):Views->Focus->1. Vertical
- Android ApiDemos示例解析(145):Views->Layouts->LinearLayout->5.Simple Form
- Android ApiDemos示例解析(146):Views->Layouts->LinearLayout->6. Uniform Size
- Android ApiDemos示例解析(147):Views->Layouts->LinearLayout->7. Fill Parent
- Android ApiDemos示例解析(149):Views->Layouts->LinearLayout->9. Layout Weight
- Android ApiDemos示例解析(150):Views->Layouts->LinearLayout->10. Background Image
- Android ApiDemos示例解析(134):Views->Layouts->Baseline->2. Bottom
- Android ApiDemos示例解析(135):Views->Layouts->Baseline->3. Center
- Android ApiDemos示例解析(136):Views->Layouts->Baseline->4. Everywhere
- Android ApiDemos示例解析(138):Views->Layouts->Baseline->6. Relative
- 以对象管理资源 auto_ptr和shared_ptr
- FPGA_8_25
- 黑马程序员_学习记录04:数组
- 不用无限路由器 不用任何软件轻松实现 发射无线信号的功能
- 利用C#编写shellcode与unicode相互转换的转换器
- Android ApiDemos示例解析(141):Views->Layouts->LinearLayout->1. Vertical
- Vaadin Web应用开发教程(32):UI布局-Panel
- 申请Google Player帐号上传自己开发的App
- CentOS系统常用基本命令
- T-SQL XQUERY.NODES
- 【网站制作视频教程】-第5讲 html图片标记_路径详解!-传智播客
- 出差之感想!
- stm32模拟iic——引脚配置、代码
- 首款windows 8 平板使用心得