Modal dialog functionality using AlertDialog
问题 I want to keep AlertDialog focused until a user presses any of the buttons on it. In other words, even if a user presses any other area (like it's parent area) or presses back button, dialog must still remain focused. Please let me know which Android 4.0 API method to use. Thanks much in advance. 回答1: use setCancelable(false); It will stop removing your AlertDialog from your screen. 来源: https://stackoverflow.com/questions/8920661/modal-dialog-functionality-using-alertdialog