线性布局LinearLayout的使用
来源:互联网 发布:知乎回答问题 出错了 编辑:程序博客网 时间:2024/05/17 22:32
LinearLayout布局是Android中常用的布局方式,是一个ViewGroup以线性方向显示其子view元素。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button1" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button2" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button3" /></LinearLayout>
其中layout_width,layout_height示_weight是属性,分别控件的宽度,高度和比例。显示效果如图:![显示效果](http://img.blog.csdn.net/20160227173942266)
0 0
- 线性布局LinearLayout的使用
- 使用线性布局LinearLayout
- 线性布局(LinearLayout)的简单使用
- 简单的LinearLayout线性布局
- 使用线性布局LinearLayout实现类似计算器的效果
- Android的布局控件----LinearLayout(线性布局)
- LinearLayout (线性布局)的分析
- 自定义自动换行的线性布局linearLayout
- 线性布局LinearLayout的那些事儿
- LinearLayout(线性布局)中weight的难点
- 线性布局LinearLayout 的注意点
- Android 线性布局:LinearLayout
- LinearLayout 线性布局管理器
- LinearLayout(线性布局)
- LinearLayout:线性布局基础
- 线性布局LinearLayout
- LinearLayout线性布局
- LinearLayout(线性布局)
- Bitmap知识点小结
- 1021 Fibonacci Again
- CGRectGet的几种用法
- Android Drawable 那些不为人知的高效用法
- iOS禁止默认拉伸现象
- 线性布局LinearLayout的使用
- java程序验证哥德巴赫猜想
- 广师Android群分享之代码版本控制系统
- CSS样式设置详解
- 关于跨进程的观察者模式
- Hello World!(Error opening registry key'software\Javasoft\Java Runtime Environment')
- [Android] ListView中getView的原理+如何在ListView中放置多个item
- MySQL5.7密码安全策略
- HDOJ_1425 sort 桶排序