Search code examples
androidradio-groupandroid-radiogroup

How to set Radio Group View to not clickable


I want to set my RadioGroupView to not clickable so that the user can't click on the buttons. I tried mRadioGroup.isActivated = false but it has no effect on my RadioGroup View. Have somebody a hint for me?


Solution

  • Disable for each button

    for (int i = 0; i < mRadioGroup.getChildCount(); i++) {
        mRadioGroup.getChildAt(i).setEnabled(false);
    }