我有这段代码可以显示单选对话框(radio)选项。
AlertDialog ad = new AlertDialog.Builder(this)
.setCancelable(false)
.setIcon(R.drawable.alert_dialog_icon)
.setTitle(R.string.choose_one)
.setSingleChoiceItems(seq, pos,null)
.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dialog, int whichButton)
{
// dialog dismissed
}
}).create();
如何获取已选择的选项?
int whichButton
:为什么它不起作用? - exploitr