1. dialog时: dialog.setCanceledOnTouchOutside(false); 2. activity的dialog形式时,activity中设置 setFinishOnTouchOutside(false)