Android中是否有办法显示一个对话框,其中已根据环境变量设置选择了一个单选按钮?
我写了以下代码。它似乎没有任何错误,我很确定它会执行,但是当显示对话框时,没有选择任何单选按钮:
switch (shape)
{
case SQUARE:
bigCircle.setSelected (false);
smSircle.setSelected (false);
if (size == BIG)
{
bigSquare.setSelected (true);
smSquare.setSelected (false);
}
else
{
bigSquare.setSelected (false);
smSquare.setSelected (true);
}
break;
case CIRCLE:
bigSquare.setSelected (false);
smSquare.setSelected (false);
if (size == BIG)
{
bigCircle.setSelected (true);
smCircle.setSelected (false);
}
else
{
bigCircle.setSelected (false);
smCircle.setSelected (true);
}
}
dialog.show();
有什么建议么??
谢谢,
R。