How to bind method on RadioGroup on checkChanged event with data-binding

After digging to the bunch of methods, I found this question on SO which helped me understand how to bind single methods of listeners. Here is what to do with RadioGroup: In RadioGroup listener you have a method onCheckedChanged(RadioGroup g, int id). So you can directly bound that method to your handler or your activity … Read more

Android: RadioGroup – How to configure the event listener

This is how you get the checked radiobutton: // This will get the radiogroup RadioGroup rGroup = (RadioGroup)findViewById(r.id.radioGroup1); // This will get the radiobutton in the radiogroup that is checked RadioButton checkedRadioButton = (RadioButton)rGroup.findViewById(rGroup.getCheckedRadioButtonId()); To use the listener, you do this: // This overrides the radiogroup onCheckListener rGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { public void onCheckedChanged(RadioGroup group, int … Read more