How can I make a ProgressDialog be cancelable by the back button but not by a screen tap?

benkdev picture benkdev · Nov 11, 2011 · Viewed 14.7k times · Source

I would like to make a ProgressDialog cancelable by the back button but not by a screen tap. Currently I use setCancelable(true).

However, in some newer devices a tap on the screen also cancels the ProgressDialog. I'd like to disable the screen tap action while the ProgressDialog is shown.

Answer

Kimi picture Kimi · Nov 11, 2011