What is the difference between Progressbar and progressDialog?

后端 未结 5 1782
一整个雨季
一整个雨季 2020-12-16 10:46

I have searched everywhere and read the official doc of Google. But I still don\'t see the difference between them.

When should we use ProgressBar and when should w

5条回答
  •  一生所求
    2020-12-16 11:04

    In addition to the differences pointed out in the rest of answers, you should take into account the following recommendation from Dialogs @ Android Developer:

    Avoid ProgressDialog

    Android includes another dialog class called ProgressDialog that shows a dialog with a progress bar. However, if you need to indicate loading or indeterminate progress, you should instead follow the design guidelines for Progress & Activity and use a ProgressBar in your layout.

    It may be also usefull to consider the following answers:

    • https://stackoverflow.com/a/12559601/2482894
    • How to avoid ProgressDialog in Android

提交回复
热议问题