【原因】官方文档中提及,
"GridLayout does not provide support for the principle of weight, as defined in weight. In general, it is not therefore possible to configure a GridLayout to distribute excess space in non-trivial proportions between multiple rows or columns ... For complete control over excess space distribution in a row or column; use a LinearLayout subview to hold the components in the associated cell group."

GridLayout官方不支持权重分配,无法直接实现组件平均占据空间。为实现类似效果,建议使用LinearLayout子视图来组织单元格组,以实现对多余空间的精确控制。
最低0.47元/天 解锁文章
1001

被折叠的 条评论
为什么被折叠?



