首页 > 其他 > 详细

Include设置layout_*无效解决方法

时间:2014-05-13 07:12:18      阅读:519      评论:0      收藏:0      [点我收藏+]

在include标签中不能省略

layout_width或者layout_height否则设置layout_weight就会无效。如下设置即可


    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
       android:layout_weight="0.0"
        android:background="@drawable/img_bg_index_selector"
        android:orientation="horizontal" >


        <include
            android:id="@+id/view_selector1"
            android:layout_weight="1.0"
               android:layout_height="wrap_content"
              android:layout_width="match_parent"
            layout="@layout/item_index_activity_selector" />


        <include
            android:id="@+id/view_selector2"
            android:layout_weight="1.0"
               android:layout_height="wrap_content"
              android:layout_width="match_parent"
            layout="@layout/item_index_activity_selector" />
    </LinearLayout>

Include设置layout_*无效解决方法,布布扣,bubuko.com

Include设置layout_*无效解决方法

原文:http://blog.csdn.net/z8711042/article/details/25646271

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