Android - Loading, please wait

前端 未结 3 1038
轮回少年
轮回少年 2021-01-30 13:51

Is there a standard \"Loading, please wait\" dialog I can use in Android development, when I invoke some AsyncTask (downloading some data from remote service for example)?

3条回答
  •  梦毁少年i
    2021-01-30 14:48

    Mirko is basically correct, however there are two things to note:

    1. ProgressDialog.show() is a shortcut that automatically creates a dialog. Unlike other dialogs, it should NOT be used in onCreateDialog(), as it will cause errors in Android 1.5.

    2. There are some further issues with AsyncTask + ProgressDialog + screen orientation changes that you should be aware of - check this out.

提交回复
热议问题