How to set radio button checked as default in radiogroup?

前端 未结 8 1582
孤城傲影
孤城傲影 2020-12-23 09:01

I have created RadioGroup and RadioButton dynamically as following:

RadioGroup radioGroup = new RadioGroup(context);
                      


        
8条回答
  •  感动是毒
    2020-12-23 09:15

    In case for xml attribute its android:checkedButton which takes the id of the RadioButton to be checked.

    ....
    

提交回复
热议问题