In my application, I use a radiogroup in which there are several radiobutton. When selected, the radiobutton sends the name of its id to activation 2. With the second activation you can return to the first and select other radiogroup options, the question is how to return to the first activation with radiogroup Once again, the option we chose earlier, that is, if radiobutton1 is already marked isCheck (true), but do we need to return to the second activation with the given id by clicking on the already marked option? A small piece of code:
OnCheckedChangeListener rad=newOnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { but = (RadioButton) radioGroup.findViewById(checkedId); int checkedIndex = radioGroup.indexOfChild(but); SavePreferences("key", checkedIndex); name =getResources().getResourceEntryName(checkedId); intent.putExtra("sample",name); startActivity(intent); finish(); } };