mardi 22 décembre 2015

clear all child of a view (RadioGroup)

i have a drawer menu with dynamic option inside it and i got to fill it. i want to clear all 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

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);
}




Aucun commentaire:

Enregistrer un commentaire