zoukankan      html  css  js  c++  java
  • Use a layout_width of 0dip instead of wrap_content for better performance.......【Written By KillerLegend】

    当你在一个Linearlayout布局中只为一个组件设置android:layout_weight属性时,那么这个组件将默认填充Linearlayout的剩余空间(宽度与高度方向),而不用事先进行测量。此时如果你对该组件的android:layout_width="wrap_content"时就会出现此警告:

    Use a layout_width of 0dip instead of wrap_content for better performance.......

    这是候,你要么把这个layout_weight属性去掉,要么将wrap_content的值设置为零,设置为零的含义就是,系统将默认填充Linearlayout的剩余空间(宽度与高度方向)。


    作者:KillerLegend
    出处:http://www.cnblogs.com/KillerLegend/
    分享最新的资源,分享个人所得,欢迎关注我的新浪微博
    新浪微博主页:ikey4u
    我的个人博客:www.ikey4u.com
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

     
  • 相关阅读:
    Shell 字符串
    shell 使用变量
    shell 数组
    shell 注释
    shell 输出双引号
    shell wc命令 统计行数
    shell :
    shell 函数调用
    pyqt 调用颜色选择器
    Navicat+Premium+12+破解补丁
  • 原文地址:https://www.cnblogs.com/killerlegend/p/3348174.html
Copyright © 2011-2022 走看看