I have a drawer menu with a dynamic option inside it and I got to fill it.
I want to clear all the child of a RadioGroup
inside adapter
but I didn't find anything.
p.s: I fill all RadioGroup
with addView
and fill it with CheckBox
ps2: The question is not about the check and uncheck. I want to find out how can remove all child of a view (like RadioGroup
).
viewHolder.mRadioGroup.setVisibility(View.VISIBLE);
/////clear viewHolder.mRadioGroup child hear, befor add new child to it
for (int i; i<10; i++) {
RadioButton radioButton = new RadioButton(mContext);
radioButton.setText(selectableValue.getValue());
viewHolder.mRadioGroup.addView(radioButton);
}