怎么在AlertDialog点击选项后,再次打开时可以记住上次的选择项

怎么在AlertDialog点击选项后,再次打开时可以记住上次的选择项

AlertDialog所在Activity加个字段
int current = 0;
String[] str;//自己添数据
new AlertDialog.Builder(this).setTitle(title).setSingleChoiceItems(
str, current, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
current = which;
//加你的点击响应
}
}).setNegativeButton("取消", null);
builder.show();