Reputation: 157
I have two activities on my android application & at the second one, it takes a while to load the data, I want to use the Progress bar to make the user feel there is an action happening, but I don't know how to set the code of the progress bar to run while a block of code executed.
Upvotes: 0
Views: 2079
Reputation: 2554
It is generally a good idea to show ProgressDialog
either before switching to the new activity, or just after new activity is shown, but data is still loading.
You can check it here: http://developer.android.com/reference/android/app/ProgressDialog.html
Upvotes: 1