List of usage examples for android.app ProgressDialog setProgressPercentFormat
public void setProgressPercentFormat(NumberFormat format)
From source file:com.mobicage.rogerthat.util.ui.UIUtils.java
public static ProgressDialog showProgressDialog(final Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, DialogInterface.OnCancelListener onCancelListener, int progressStyle, boolean show) { ProgressDialog dialog = new ProgressDialog(context); dialog.setTitle(title);/*from www . j a v a 2 s .c om*/ dialog.setMessage(message); dialog.setIndeterminate(indeterminate); dialog.setCancelable(cancelable); dialog.setProgressNumberFormat(null); dialog.setProgressPercentFormat(null); dialog.setOnCancelListener(onCancelListener); dialog.setProgressStyle(progressStyle); dialog.setOnShowListener(new ProgressDialog.OnShowListener() { @Override public void onShow(DialogInterface dialog) { ProgressDialog progressDialog = (ProgressDialog) dialog; ProgressBar progressBar = (ProgressBar) progressDialog.findViewById(android.R.id.progress); UIUtils.setColors(context, progressBar); } }); if (show) { dialog.show(); } return dialog; }