我有一个 AlertDialogBox,我在上面放了单选按钮,但是我有一个问题,每当我点击它们时,它们都被选中了。将取消选择另一个.. 我该怎么做?这是我的代码..
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Standard Deviation");
alert.setIcon(R.drawable.droid);
RadioButton one = new RadioButton(this);
one.setText("one set");
RadioButton two = new RadioButton(this);
two.setText("two sets");
LinearLayout ll=new LinearLayout(Treatment.this);
ll.setOrientation(LinearLayout.VERTICAL);
ll.addView(one);
ll.addView(two);
alert.setView(ll);
AlertDialog alertDialog = alert.create();
alertDialog.show();