码迷,mamicode.com
首页 > 移动开发 > 详细

Android - 警告Nested weights are bad for performance

时间:2014-10-30 19:09:37      阅读:312      评论:0      收藏:0      [点我收藏+]

标签:mystra   android   nested weights   linearlayout   警告   

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.


bubuko.com,布布扣

Android - 警告Nested weights are bad for performance

标签:mystra   android   nested weights   linearlayout   警告   

原文地址:http://blog.csdn.net/caroline_wendy/article/details/40624869

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!