Last active
June 6, 2016 17:44
-
-
Save arthtilva/92cc42062c90d9cda937635b504ee180 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static ProgressDialog progressDialog; | |
public static void showProgress(Activity activity) { | |
progressDialog = new ProgressDialog(activity); | |
progressDialog.setIndeterminate(false); | |
progressDialog.setCancelable(false); | |
progressDialog.setMessage("Loading..."); | |
progressDialog.show(); | |
} | |
public static void showProgress(Activity activity, String message) { | |
progressDialog = new ProgressDialog(activity); | |
progressDialog.setIndeterminate(false); | |
progressDialog.setCancelable(false); | |
progressDialog.setMessage(message); | |
progressDialog.show(); | |
} | |
public static void dismissProgress() { | |
if (progressDialog.isShowing()) | |
progressDialog.dismiss(); | |
else | |
Log.i("Dialog", "already dismissed"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment