I am trying to set an OnCheckedChangeListener
on a RadioGroup
but Android Studio gives me an error when I write it.
I used for the radio group
RadioGroup CheckList1 = (RadioGroup)findViewById(R.id.First_id_radio_group);
RadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener) {
}
When I write it as suggested (CheckList1.setOnCheckedChangeListener(...)
), I get the following warning in Android Studio, the method gets crossed out: