make progress dialog loading android code example

Example 1: custom progressdialog android

private AlertDialog progressDialog;
progressDialog = new SpotsDialog(mContext, R.style.Custom);

//Am using it in an AsyncTask. So in  my onPreExecute, I do this:
public void onPreExecute() {
  super.onPreExecute();
  progressDialog.show();
  ...
 }

//dismiss in onPostExecute
public void onPostExecute(){
   progressDialog.dismiss();
 }

Example 2: custom progressdialog android

dependencies {
...
   compile 'com.github.d-max:spots-dialog:0.4@aar'
}

Tags:

Java Example