Sometimes when you need to run for a time-consuming task, requiring the emergence of a wait (that is, a small white circle that has been transferred) Dialog to tell users now need to wait a bit, because the time-consuming thing to do, but can be set to prevent Dialog click outside cancel Dialog, I forgot physical return key can also be canceled Dialog, so online searching for information are summarized below.
1, directly
dia_wait.setCancelable(false);
This method is the most simple and crude and best use.
2, onKeyDown shield (not so good)
3, only set setOnKeyListener monitor above do not recommend to the appropriate Dialog.