我是java中的新手并且radioButtondelivery.setSelected(false);
遇到问题,radioButtondelivery
处于红线下,请帮助我。
public void onRadioButtonClicked(View view) {
// Is the button now checked?
boolean checked = ((RadioButton) view).isChecked();
// Check which radio button was clicked
switch(view.getId()) {
case R.id.radioButtonpickup:
if (checked)
radioButtondelivery.setSelected(false);
break;
case R.id.radioButtondelivery:
if (checked)
// code here
break;
}
}
答案 0 :(得分:1)