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
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 aProgressBar
in your layout.
It may be also usefull to consider the following answers: