这样运行正常,只能选其中一个RadioButton
<RadioGroup
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/r1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true" />
<RadioButton
android:id="@+id/r2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RadioGroup>
去掉中间两个RadioButton的id后,两个RadioButton可以同时选中。 何解?不加id就说明不在一组?