4 回答

竹马君
TA贡献64条经验 获得超115个赞
layout_weight该属性的作用是决定控件在其父布局中的显示权重,一般用于线性布局中。
其值越小,则对应的layout_width或layout_height的优先级就越高,一般横向布局中,决定的是layout_width的优先级;纵向布局中,决定的是layout_height的优先级。
现在最为流行的0px设值法,结合layout_weight,却可以使控件成正比例显示

现实丶DE世界
TA贡献2条经验 获得超43个赞
layout_weight表示LinearLayout中额外空间的划分。
我认为是首先给没有设置layout_weight的分配空间,然后再把剩余空间 按照权重划分,不知道理解的对不对
- 4 回答
- 0 关注
- 2415 浏览
添加回答
举报
0/150
提交
取消