开发者

ProgressDialog in Android for new Activity

开发者 https://www.devze.com 2023-01-24 14:36 出处:网络
When the user taps a menu item I need to create a new Activity. This Activity loads a lot of data then shows a map and takes some seconds to be shown.

When the user taps a menu item I need to create a new Activity. This Activity loads a lot of data then shows a map and takes some seconds to be shown. How can I use ProgressDialog from an activity to another? I actually cannot see it if I call

ProgressDialog dialog = ProgressDialog.show(this, "&q开发者_如何转开发uot;, "Loading. Please wait...", true);

Thanks in advance.


See the answer here

You should use your AsyncTask in onCreate() method of the Activity you start from menu.

0

精彩评论

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