初识百分比布局
来源:互联网 发布:软件测试缺陷报告 编辑:程序博客网 时间:2024/06/03 23:45
两种布局供大家使用:
PercentRelativeLayout、PercentFrameLayout,通过名字就可以看出,这是继承自FrameLayout和RelativeLayout两个容器类;
支持的属性有:
layout_widthPercent、layout_heightPercent、
layout_marginPercent、layout_marginLeftPercent、
layout_marginTopPercent、layout_marginRightPercent、
layout_marginBottomPercent、layout_marginStartPercent、layout_marginEndPercent。
可以看到支持宽高,以及margin。
也就是说,大家只要在开发过程中使用PercentRelativeLayout、PercentFrameLayout替换FrameLayout、RelativeLayout即可。
以上官方两种
但是也有PercentLinearLayout
只要导入
compile ‘com.zhy:percent-support-extends:1.0.5’
三种就都有了。
阅读全文
0 0
- 初识百分比布局
- 百分比布局
- 百分比布局
- 百分比布局
- 百分比布局
- 百分比布局
- 百分比布局
- 百分比布局
- 百分比布局
- CSS 使用百分比布局
- RelativeLayout实现百分比布局
- CSS百分比布局
- Android 支持百分比布局
- Android支持百分比布局
- Android百分比布局初探
- iOS AutoLayout 百分比布局
- Android百分比布局:PercentRelativeLayout
- Android百分比布局:PercentFrameLayout
- ES6中的let const
- BZOJ4264 边集哈希
- 方法finalize()的应用
- Hdu 1561 The more, The Better 树上DP 解题报告
- java文件传输基础:序列化中子类和父类构造函数的调用问题
- 初识百分比布局
- ldap链接比较好的工具
- HDU
- 类
- 系统范围内拥有相同基址的DLL 以及这样做的原因
- 【python】Python速成(四) --函数式编程
- poj3067 Japan 树状数组+逆序对
- mybatis两表联合查询
- 欢迎使用CSDN-markdown编辑器