2013-03-21 153 views

回答

9

只需設置checked屬性在你的XML爲每RadioButton爲false:

android:checked="false" 

這應該解決的問題。

2

嘗試

RadioGroup.check(0) 

0是將nevere由ADT生成

UPD一個id:從RadioGroup中

public class RadioGroup extends LinearLayout { 
    // holds the checked id; the selection is empty by default 
    private int mCheckedId = -1; 
    ... 
5

源你看在Android開發者指南?

http://developer.android.com/reference/android/widget/RadioGroup.html

Intially,所有的單選按鈕是選中。

雖然可以用clearCheck()方法

做到這一點的代碼清除該選擇。當選擇被清除時,該組中沒有選擇單選按鈕,並且getCheckedRadioButtonId()返回null。

也許你的問題可能與我的理解有所不同。也許更多地解釋你如何加載問題等等。

+1

這必須選擇正確的答案! – Andranik 2015-10-20 11:57:21

相關問題