开发者

How to make the application unfocusable, when some function is running?

开发者 https://www.devze.com 2023-02-22 10:49 出处:网络
I have a button in my application. When I clicked the button I am starting some function using thread. When the thread is running I don\'t want any of my view get focus (including tab also). How can I

I have a button in my application. When I clicked the button I am starting some function using thread. When the thread is running I don't want any of my view get focus (including tab also). How can I make the whole application unfocusable/untouchable til开发者_StackOverflow中文版l the thread completes its working?


You should show a ProgressDialog. If you don't do so, the user will think that your app is frozen. You can use the setCancelabel(false) method in order to prevent user from closing the dialog.

0

精彩评论

暂无评论...
验证码 换一张
取 消