List of utility methods to do Progress Dialog Create
void | stallWithProgressDialog(Context context, String title, String msg, boolean indeter, boolean cancelable, int stallTime) Function to stall the UI for given time. final ProgressDialog ringProgressDialog = ProgressDialog.show( context, title, msg, indeter); ringProgressDialog.setCancelable(cancelable); final int stalltime = stallTime; new Thread(new Runnable() { @Override public void run() { try { ... |
ProgressDialog | showProgressDialog(Context mContext, CharSequence processMessage) show Progress Dialog ProgressDialog pDlg = new ProgressDialog(mContext); pDlg.setMessage(processMessage); pDlg.setProgressDrawable(WallpaperManager.getInstance(mContext) .getDrawable()); pDlg.setProgressStyle(ProgressDialog.STYLE_SPINNER); pDlg.setCancelable(false); return pDlg; |
ProgressDialog | showProgressDialog(Context c, String title, String msg) show Progress Dialog return ProgressDialog.show(c, title, msg, true);
|
void | hideProgressDialog() This method will hide existing progress dialog. It will not throw any Exception if there is no progress dialog on the screen and can also be called from non UI threads. mSmartAndroidActivity.runOnUiThread(new Runnable() { @Override public void run() { try { if (progress.isShowing()) progress.dismiss(); } catch (Throwable e) { }); |
void | showProgressDialog(String msg) This method will show the progress dialog with given message in the given activity's context. The progress dialog will be non cancellable by default. progressMsg = msg; mSmartAndroidActivity.runOnUiThread(new Runnable() { public void run() { progress = ProgressDialog.show(mSmartAndroidActivity, "", progressMsg); }); |
void | showProgressDialog(String msg, final boolean isCancellable) This method will show the progress dialog with given message in the given activity's context. The progress dialog can be set cancellable by passing appropriate flag in parameter. progressMsg = msg; mSmartAndroidActivity.runOnUiThread(new Runnable() { public void run() { progress = ProgressDialog.show(mSmartAndroidActivity, "", progressMsg); progress.setCancelable(isCancellable); }); ... |
void | showProgressBar(ProgressDialog progressBar, String message) show Progress Bar progressBar.setCancelable(false); progressBar.setMessage(message); progressBar.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressBar.show(); |