2010-03-02

How to display a progress indicator in an Android app

dialog = ProgressDialog.show(Context, "Heading", "Message", false);

call the above code where you want to display the progress dialog and call the following code to dismiss the progress dialog.

dialog.dismiss();

Note: Never ever call a network operation in UI thread. If you call those both operations in the same thread, then the progress dialog may not shown.

No comments: