2013-03-21 134 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

相关问题