hello,
I have a simple RadioGroup in one of my view, with several
RadioButton :
RadioGroup group = new RadioGroup(this.getApplicationContext());
this.setContentView(group);
for (int i = 0; i < 10; i++) {
group.addView(getRadioButton(i));
}
private RadioButton getRadioButton(final int position) {
RadioButton v = new RadioButton(this.getApplicationContext());
if (position == 0) {
v.setChecked(true);
}
return v;
}
It display 10 radio buttons, and one of them is checked (the first
one). But if I click on another radio button, the first one stay
selected ...
Is there something wrong with my code ?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en