これは私のコードです:
<CheckBox
android:id="@+id/sprint_checkbox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/sprint_game" />
<CheckBox
android:id="@+id/marathon_checkbox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/marathon" />
<CheckBox
android:id="@+id/never_ending_checkbox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/never_ending" />
私がやりたいのは、これらの1つがチェックされたときに「検出」し、他の2つを「無効」に設定して、ユーザーが一度に1つしか選択できないようにすることです。「.setOnCheckedChangeListener」を使用しようとしましたが、使用できません。誰かがコードを手伝ってくれますか?どうもありがとう!