I have an AlertDialog dlgDetails which is shown from another AlertDialog dlgMenu. I would like to be able to show dlgMenu again if the user presses the
AlertDialog dlgDetails
AlertDialog dlgMenu
Found a shorter solution :) try this:
accountDialog = builder.create(); accountDialog.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { dialog.dismiss(); activity.finish(); } });