<RadioGroup>
<TableRow>
<RadioButton
android:id="@+id/a"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="lolo"
/>
<RadioButton
android:id="@+id/b"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="sh"
/>
</TableRow>
<TableRow>
<RadioButton
android:id="@+id/c"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="s"
/>
<RadioButton
android:id="@+id/d"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="cannot be determined"
/>
</TableRow>
</RadioGroup>
我想選擇四個中的一個rdio按鈕,它像4個單獨的單選按鈕? ,得到選擇的所有R,我在Android的開發利用策略新非常和善引導我感謝名單wny單選按鈕組在代碼中不能正常工作
創建一個選中的複選框和另一個未選中的兩個圖像,它可以幫助你擺脫這個問題。 – AkashG 2012-07-25 10:10:02
錯誤:錯誤:找不到與給定名稱匹配的資源(在'drawable'處,值爲'@ drawable/selected1')。 – dashh 2012-07-25 10:42:50
@ dreams13你必須在你的可繪製文件夾中放入兩個名爲selected1和unselected1的圖像。 – AkashG 2012-07-25 10:46:11