我正在使用“onCreateDialog”方法从活动中打开一个警报对话框:
protected Dialog onCreateDialog(int id) {
Dialog dialog = null;
switch(id) {
case DIALOG_PASSWORD_VERIFICATION:
LayoutInflater factory = LayoutInflater.from(this);
final View passwordDialog = factory.inflate(R.layout.password, null);
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Please enter your password");
alert.setView(passwordDialog);
alert.setCancelable(false);
alert.create();
alert.setPositiveButton("Ok", new PasswordDialogListenerOk(
passwordDialog, getApplicationContext()));
alert.setNegativeButton("Cancel", new PasswordDialogListenerOk(
passwordDialog, getApplicationContext()));
alert.show();
break;
default:
dialog = null;
}
return dialog;
}
一切正常,顺利,但我不知道我在哪里恢复我的活动。对话框消失了,但是对话框关闭后活动中的返回点在哪里?