Modal dialog functionality using AlertDialog

試著忘記壹切 提交于 2019-12-31 04:54:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!