RadioGroup Checked Child

  • 内容
  • 评论
  • 相关
int _RadioButtonId = mRadioButtonGroup.getCheckedRadioButtonId();
View _RadioButton = mRadioButtonGroup.findViewById(_RadioButtonId );
int _Idx = mRadioButtonGroup.indexOfChild(_RadioButton);
((RadioButton)mRadioButtonGroup.getChildAt(_Idx)).setChecked(true);

OR
mRadioButtonGroup.check(R.id.main_rb_master);