Android百分比布局:PercentRelativeLayout
在最新的Android support包中,增加了开发者期待的百分比布局PercentRelativeLayout和PercentFrameLayout,不过,Android官方是以support包的支持形式出现。使用百分比布局前,需要先导入在support支持包目录下名为“percent”的库,如图所示:
将percent导入到Eclipse作为一个lib,然后就可以使用百分比布局PercentRelativeLayout和PercentFrameLayout。
本文以PercentRelativeLayout为例加以说明。
PercentRelativeLayout在RelativeLayout增加了一些针对百分比布局的必要属性如:
layout_widthPercent 、 layout_heightPercent
layout_marginPercent
layout_marginLeftPercent
layout_marginTopPercent
layout_marginRightPercent
layout_marginBottomPercent
layout_marginStartPercent
layout_marginEndPercent
其中比较重要的是layout_widthPercent
最后
以上就是甜蜜巨人最近收集整理的关于android 边距 百分比,Android百分比布局:PercentRelativeLayout的全部内容,更多相关android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复