I have a progress bar in start of one of my activities. I want to be able to press back when it is still processing to go back to my previous activity. I tried setting it setCancelable to true but it will also be dismissed when the user clicks on the screen. I only want the progress bar to be dismissed when the user clicks the back button. There are some topics in sf about this but I couldn't reach what I wanted from any of them.
I'll appreciate if you can help me with this.
Asked
Active
Viewed 1,978 times
-1

m0j1
- 4,067
- 8
- 31
- 54
-
`progress.setCanceledOnTouchOutside(false);` try this. also add this `setCancelable(true);` – Shabbir Dhangot Mar 10 '15 at 07:18
-
Thanks @ShabbirDhangot it is by far the best solution, but the best solution would be the one to press back and go to the previous activity and not just dismiss the progress bar. – m0j1 Mar 10 '15 at 07:54