LinearLayout(线性布局)

https://www.jianshu.com/p/e6835ed20d9a

这里写图片描述

按比例划分水平或者竖直方向:
划分水平方向时:将layout_width属性设置为0dp,接着为weight设置比例
同理竖直方向:将layout_height属性设置为0dp,接着为weight设置比例
(将对应的layout_width或者layout_height设置为0dp的原因是各个子控件通过设置weight(权重)来获得父控件中的剩余空间)

猜你喜欢

转载自blog.csdn.net/zjpp2580369/article/details/81302097
今日推荐