您的位置:首页 > 其它

LinearLayout weight

2016-05-17 15:13 351 查看
设置weight需要把width设置为0dp,这样可以提高性能

官方文档解释:

To improve the layout efficiency when you specify the weight, you should change the width of the EditText to be zero (0dp). Setting the width to zero improves layout performance because using "wrap_content" as the width requires the system to calculate a width that is ultimately irrelevant because the weight value requires another width calculation to fill the remaining space.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: