![]() ![]()
| CSC 349: The Week beginning Jan. 22 |
![]() ![]()
|
/>final RadioGroup rgTip = (RadioGroup) findViewById(R.id.rgTip); int radio_id = rgTip.getCheckedRadioButtonId(); RadioButton myRad = (RadioButton) findViewById(radio_id);
onCreate
View rg_child = rgDay.getChildAt(1); RadioButton my_radio_button =(RadioButton)rg_child; my_radio_button.setChecked(true);
.setChecked(false) but this made it difficult for the user to re-select the choice that
had just been de-selected. Then I found the RadioGroup's clearCheck() which was simpler
and worked better.