首页 > 技术文章 > prevent dialog from closing

shawnwxm 2018-08-15 10:13 原文

To prevent dialog box from getting dismissed on back key pressed use this

dialog.setCancelable(false);

And to prevent dialog box from getting dismissed on outside touch use this

dialog.setCanceledOnTouchOutside(false);

 

推荐阅读