开发者

Displaying ProgressBar in Activity of TabHost

开发者 https://www.devze.com 2023-02-15 17:50 出处:网络
I am using TabHost in my application. When I use ProgressBar in any one of the activity the application stops unexpectedly.

I am using TabHost in my application. When I use ProgressBar in any one of the activity the application stops unexpectedly.

When any Tab is clicked, the corresponding activity is called. This activity does some background processing(gets data from WebService) and then displays that data. The problem is when I u开发者_如何学Pythonse ProgressBar its not working. The application gets forcefully closed. I want to display ProgressBar till the activity gets the data from the WebService.


Use

ProgressDialog.show(getParent(),"My Msg"); 

GetParent will help you.

Thank you.

0

精彩评论

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