You can use the progress dialog as described in the docs. Alternatively (and perhaps more elegantly) you can use the progress indicator in the activity title bar. In your activity, before calling, setContentViewadd this line:
requestWindowFeature(Window.FEATURE_PROGRESS);
Then, by calling setProgress(int), you can indicate the progress. When progress reaches 10,000, the progress indicator in the title bar disappears. Please note: if you determine progress in a thread other than the UI, you must use a handler to call setProgress.
source
share