prevent dialog from closing

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);

猜你喜欢

转载自www.cnblogs.com/shawnwxm/p/9479844.html