首页 > 其他 > 详细

RadioButton一定要设置id,会导致radiobutton不互斥,后果很严重。。

时间:2014-05-21 17:12:06      阅读:840      评论:0      收藏:0      [点我收藏+]

今天编写代码如下:发现2个radiobutton居然都可以选中。这我真的晕了。。后来偶然发现原来是没有设置Id的原因。。。



<RadioGroup
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <RadioButton
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:checked="true"
            android:text="已下载(2)" />

        <RadioButton
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="下载中(1)" />
    </RadioGroup>



RadioButton一定要设置id,会导致radiobutton不互斥,后果很严重。。,布布扣,bubuko.com

RadioButton一定要设置id,会导致radiobutton不互斥,后果很严重。。

原文:http://blog.csdn.net/leehu1987/article/details/26380915

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