国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 互联网 > Android - 警告Nested weights are bad for performance

Android - 警告Nested weights are bad for performance

来源:程序员人生   发布时间:2014-11-18 08:46:45 阅读次数:3027次

Android - 正告Nested weights are bad for performance


本文地址: http://blog.csdn.net/caroline_wendy


缘由: Layout weights require a widget to be measured twice. When a LinearLayout with non-zero weights is nested inside another LinearLayout with non-zero weights, then the number of measurements increase exponentially.
嵌套权值(Nested Weights), 权值会被计算两次, 改变时, 会依照比例进行改变.

解决方法: 使用RelativeLayoutGridLayout代替LinearLayout.



生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生