android UI布局设计 —— layout_weight浅见
来源:互联网 发布:linux下创建新项目 编辑:程序博客网 时间:2024/06/06 00:04
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:theme="@android:style/Theme.NoTitleBar"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="5" android:background="@color/skyblue"> </RelativeLayout> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:background="@color/silver"> </ScrollView></LinearLayout>
layout_weight其实就给在LinearLayout布局中的诸多视图赋予重要度的意思。也可以理解为各个视图在这个线性布局中所占的比例。
在常用的layout_width和layout_height是指定视图宽高值,其属性值有wrap_content,fill_parent(match_parent)或者指定大小。但是这样的设置其实各个视图在布局中所占的大小是均等的或者根据内容的多少自动布局的形式。这时候我们为了在不同屏幕尺寸的设备上让UI布局不产生太大变化,需要给各个视图指定它们所能占有的空间大小比例。
- android UI布局设计 —— layout_weight浅见
- android UI设计 layout_weight解析
- Android UI设计——布局方法
- Android布局设计中的layout_weight的学习
- Android 布局学习之——LinearLayout的layout_weight属性
- android布局---android:layout_weight
- Android UI杂谈---layout_weight
- Android 布局 Layout_weight 详解
- Android布局之layout_weight
- Android UI 设计-相对布局
- android随笔23——框架浅见
- android布局之LinearLayout, layout_weight
- android布局之LinearLayout, layout_weight
- android布局与多屏适配---layout_weight
- android布局详解之layout_weight
- android 布局文件 layout_weight用法
- Android布局的layout_weight属性
- android布局中的layout_weight属性
- libev库的用法
- CRC (Cyclic redundancy check) java 实现
- RadioGroup中RadioButton不能互斥
- 如何开启机器的ping通过防火墙
- 并发编程之屏障CyclicBarrier
- android UI布局设计 —— layout_weight浅见
- Eclipse安装greenUML插件-推荐
- Leetcode Trapping Rain Water
- Android防止内存溢出浅析 .
- ExtJs-1
- 对象数组转换
- DM6437-读写DDR测试过程
- UIView深入浅出
- 图片轮播,a连接有问题,解决方案,橡树的小屋代码细节修改