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
When your iterations is countable (doing operations in loop, executing code x times etc.) use ProgressBar, if task is not countable status (like invoking web service) use ProgressDialog
From the android documentation
ProgressBar:Visual indicator of progress in some operation. Displays a bar to the user representing how far the operation has progressed; the application can change the amount of progress (modifying the length of the bar) as it moves forward. There is also a secondary progress displayable on a progress bar which is useful for displaying intermediate progress, such as the buffer level during a streaming playback progress bar.
ProgressDialog:A dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time.