List of usage examples for android.app ProgressDialog ProgressDialog
public ProgressDialog(Context context)
From source file:Main.java
public static ProgressDialog showProgressDialog(Context context, String text) { if (null != context) { ProgressDialog dialog = new ProgressDialog(context); dialog.setMessage(text);// w ww . jav a 2 s . c o m dialog.setIndeterminate(true); dialog.setCancelable(false); dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent); dialog.show(); return dialog; } return null; }
From source file:Main.java
/** * create progress bar/*from w w w.j a va 2 s .com*/ * **/ public static void progressDialog(Context c, String s, Boolean b) { mProgress = new ProgressDialog(c); mProgress.setMessage(s); mProgress.setCancelable(b); }
From source file:Main.java
public static void showProgressDialog(Context context) { progressDialog = new ProgressDialog(context); progressDialog.setCancelable(false); progressDialog.setMessage("One Moment..."); progressDialog.show();/*from ww w .jav a2 s. c o m*/ }
From source file:Main.java
public static Dialog setLoadingDialog(Activity activity, String message) { ProgressDialog progressDialog = new ProgressDialog(activity); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.setMessage(message);/*from ww w .j a v a 2 s .c om*/ return progressDialog; }
From source file:Main.java
public static ProgressDialog showProgressDialog(Activity context, int message, ProgressDialog.OnCancelListener cancelListener) { ProgressDialog mDialog = new ProgressDialog(context); mDialog.setCancelable(cancelListener != null); mDialog.setOnCancelListener(cancelListener); mDialog.setMessage(context.getString(message)); mDialog.setIndeterminate(true);//from w ww .jav a 2 s. c o m mDialog.show(); return mDialog; }
From source file:Main.java
public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable) { ProgressDialog dialog = new ProgressDialog(context); dialog.setTitle(title);//from ww w .jav a 2 s .c om dialog.setMessage(message); dialog.setIndeterminate(indeterminate); dialog.setCancelable(cancelable); dialog.show(); return dialog; }
From source file:Main.java
public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable) { ProgressDialog dialog = new ProgressDialog(context); dialog.setTitle(title);//from w ww . ja va 2 s.com dialog.setMessage(message); dialog.setIndeterminate(indeterminate); dialog.show(); return dialog; }
From source file:Main.java
public static ProgressDialog createProgressDialog(Context mContext) { final ProgressDialog dialog = new ProgressDialog(mContext); try {/* w w w . ja v a2s .c o m*/ Activity a = (Activity) mContext; a.runOnUiThread(new Runnable() { @Override public void run() { dialog.show(); } }); } catch (WindowManager.BadTokenException e) { } dialog.setCancelable(false); return dialog; }
From source file:Main.java
/** * @param context//from w w w . j ava 2 s . c o m * @param message */ public static void showProgressDialog(Context context, String message) { mDialog = new ProgressDialog(context); mDialog.setMessage(message); mDialog.show(); }
From source file:Main.java
public static ProgressDialog showDialog(Activity context, @SuppressWarnings("SameParameterValue") String strContent) { if (context != null) { ProgressDialog infoDialog = new ProgressDialog(context); infoDialog.setMessage(strContent); infoDialog.show();/* ww w .ja v a2s .co m*/ return infoDialog; } return null; }