首页 > 移动平台 > 详细

Android - 警告Nested weights are bad for performance

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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!