首页 > 技术文章 > Android RadioGroup设置默认选中项

Jett 2016-05-10 14:47 原文

今天有人问。Android 里面

RadioGroup里面有两个RadioButton怎么设置默认值? 第一个RadioButton设置 android:checked="true" 属性后,两个RadioButton就不互斥了。
其实,这个问题的解决方式很简单,给你的两个RadioButton 添加 Id 就可以了。

推荐阅读