Use the ProgressDialog class (which extends AlertDialog). Right now we only have a Loading data... message when fetching data from the API.
// To show the spinner
ProgressDialog progress = new ProgressDialog(this);
progress.setTitle("Loading");
progress.setMessage("Wait while we fetch the latest posts to update the timeline...");
progress.show();
// To dismiss the dialog
progress.dismiss();
Shortcut:
ProgressDialog.show(this, "Loading", "Wait while we fetch the latest posts to update the timeline...");
Use the
ProgressDialog
class (which extendsAlertDialog
). Right now we only have a Loading data... message when fetching data from the API.Shortcut:
ProgressDialog.show(this, "Loading", "Wait while we fetch the latest posts to update the timeline...");
More info here: http://developer.android.com/reference/android/app/ProgressDialog.html