1. 程式人生 > >dialog.setCancelable和dialog.setCanceledOnTouchOutside區別

dialog.setCancelable和dialog.setCanceledOnTouchOutside區別

dialog.setCancelable(false);

dialog彈出後會點選螢幕或物理返回鍵,dialog不消失

dialog.setCanceledOnTouchOutside(false);

dialog彈出後會點選螢幕,dialog不消失;點選物理返回鍵dialog消失