ProgressDialog in Android for new Activity

三世轮回 提交于 2019-12-07 11:58:42

问题


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, "", "Loading. Please wait...", true);

Thanks in advance and greetings c.


回答1:


See the answer here

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



来源:https://stackoverflow.com/questions/4144080/progressdialog-in-android-for-new-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!