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();
}
});
私の要件は、ユーザーが次のボタンをクリックするたびに、ラジオボタンを選択せずにオプションとして表示する必要があることです. 、その前に、私がしなければならないことのためにラジオグループのラジオボタンをクリアする必要があります......
前もって感謝します.......