Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Make ProgessDialog Uncloseable

How can I make my ProgessDialog uncloseable, so that the user cannot hit the back key, or touch the screen outside of the dialog to dismiss it?

like image 875
Amandeep Grewal Avatar asked Dec 21 '22 11:12

Amandeep Grewal


2 Answers

dialog.setCancelable(false);

like image 72
Rob Avatar answered Jan 03 '23 03:01

Rob


You need to use setCancelable to false

progressDialog.setCancelable(false);
like image 25
Ravi Vyas Avatar answered Jan 03 '23 05:01

Ravi Vyas