Home > Mobile >  RadioGroup why preach not value, has been empty, don't know where to write it
RadioGroup why preach not value, has been empty, don't know where to write it

Time:04-26

//get the user gender
Private void updateGender () {
RadioGroup=(radioGroup) the findViewById (R.i d.u pdate_rdg_gender);
//use setOnCheckedChangeListener () set to monitor events for RadioGroup
RadioGroup. SetOnCheckedChangeListener (new radioGroup. OnCheckedChangeListener () {
@ Override
Public void onCheckedChanged (RadioGroup group, int checkedId) {
RadioButton RadioButton=(RadioButton) the findViewById (checkedId);
Sex=radioButton. GetText (). The toString ();
}
});
}
  • Related