RadioGroup group=(RadioGroup)findviewbyid(R.id.group);
RadioButton b=(RadioButton)findviewbyid(R.id.button);
RadioButton b1=(RadioButton)findviewbyid(R.id.button1);
RadioButton b2=(RadioButton)findviewbyid(R.id.button2);
group.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group,int checkedId) {
// TODO Auto-generated method stub
selected=(RadioButton)findViewById(checkedId);
userAnswer=selected.getText().toString();
}
});
button=(Button)findviewbyid(R.id.butn);
button.setOnclickListener(new View.OnclickListener(){
void onclick()
{
group.clearCheck();
}
});
我的要求是每当用户点击下一个按钮时我需要显示单选按钮作为选项而没有选择.如果用户单击一个选项,他点击下一个按钮,然后点击他之前单击(选中)的选项,下次自动选择在此之前,我需要清除放射线组中的无线电按钮,因为我必须做的……
提前致谢…….