我已經在RadioGroup下添加了2個RadioButton並啓用了第一個,當我選擇第二個時它不取消選擇第一個。你可以建議我什麼是錯在這爲什麼RadioGroup選擇多個RadioButtons
這裏是我的xml:
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="NO"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YES"/>
</RadioGroup>
你'RadioButton's需要的ID。 –