本文共 724 字,大约阅读时间需要 2 分钟。
Google开始支持百分比的方式布局了已经大半年了吧(7个月??)
这个项目阐述了百分比布局方式,方法。support-lib
这个库为我们提供了什么呢? <li>两种布局: <pre>PercentRelativeLayout,PercentFrameLayout,他们继承自FrameLayout和RelativeLayout两个容器类;</pre> <li>支持的属性有: <pre>占宽比,占高比 layout_widthPercent layout_heightPercent 左上右下,开始,结束,外边距比例 layout_marginLeftPercent layout_marginTopPercent layout_marginRightPercent layout_marginBottomPercent layout_marginStartPercent layout_marginEndPercent </pre>How to use :
使用条件: Pre-requisitesAndroid SDK v22
Android Build Tools v22.0.1 Android Percent Support Repository v22.2.0 Android Support v4 Repository v22.2.0 according to the the manifest minsdk is v7 (android 2.1)转载地址:http://jgovl.baihongyu.com/