List of usage examples for android.app ProgressDialog STYLE_HORIZONTAL
int STYLE_HORIZONTAL
To view the source code for android.app ProgressDialog STYLE_HORIZONTAL.
Click Source Link
From source file:com.orange.labs.sample.UploadPicture.java
public UploadPicture(Context context, OrangeCloudAPI<?> api, OrangeCloudAPI.Entry entry, File file) { mContext = context;/*w w w. jav a 2 s . c o m*/ mApi = api; mEntry = entry; mFile = file; mDialog = new ProgressDialog(context); mDialog.setMax(100); mDialog.setMessage(mContext.getResources().getString(R.string.upload_image_title) + file.getName()); mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); mDialog.setProgress(0); mDialog.show(); }
From source file:net.zionsoft.obadiah.ui.fragments.ProgressDialogFragment.java
@Override @NonNull/*from www . j a v a 2s. c o m*/ public Dialog onCreateDialog(Bundle savedInstanceState) { final ProgressDialog dialog = new ProgressDialog(getActivity()); final Bundle args = getArguments(); if (args.containsKey(KEY_MAX_PROGRESS)) { dialog.setIndeterminate(false); dialog.setMax(args.getInt(KEY_MAX_PROGRESS)); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); } dialog.setMessage(getString(args.getInt(KEY_MESSAGE))); dialog.show(); return dialog; }
From source file:com.packpublishing.asynchronousandroid.chapter3.ShowMyPuppyHeadlessActivity.java
void prepareProgressDialog() { progress = new ProgressDialog(this); progress.setTitle(R.string.downloading_image); progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progress.setProgress(0);/*from ww w.j av a2 s .com*/ progress.setMax(100); progress.setCancelable(true); progress.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { downloadFragment.cancel(); } }); progress.show(); }
From source file:com.github.naofum.gogakudroid.AsyncDownload.java
@Override protected void onPreExecute() { Log.d(TAG, "onPreExecute"); progressDialog = new ProgressDialog(owner); progressDialog.setMessage(owner.getString(R.string.downloading)); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setCancelable(true);/*from w w w. j a v a 2 s. c om*/ progressDialog.setCanceledOnTouchOutside(false); progressDialog.setProgress(0); progressDialog.show(); }
From source file:com.nextgis.maplibui.fragment.LayerFillProgressDialogFragment.java
private static void createProgressDialog() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) mProgressDialog = new ProgressDialog(mActivity, android.R.style.Theme_Material_Light_Dialog_Alert); else//from www . j ava 2 s. c o m mProgressDialog = new ProgressDialog(mActivity); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) mProgressDialog.setProgressNumberFormat(null); mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); mProgressDialog.setCanceledOnTouchOutside(false); mProgressDialog.setButton(DialogInterface.BUTTON_POSITIVE, mActivity.getString(R.string.menu_visibility_off), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mIsShowing = false; } }); mProgressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, mActivity.getString(android.R.string.cancel), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Intent intentStop = new Intent(mActivity, LayerFillService.class); intentStop.setAction(LayerFillService.ACTION_STOP); mActivity.startService(intentStop); } }); }
From source file:com.nextgis.mobile.util.ApkDownloader.java
@Override protected void onPreExecute() { super.onPreExecute(); ControlHelper.lockScreenOrientation(mActivity); mProgress = new ProgressDialog(mActivity); mProgress.setMessage(mActivity.getString(R.string.message_loading)); mProgress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); mProgress.setIndeterminate(true);//from w w w . j ava2 s. com mProgress.setCanceledOnTouchOutside(false); mProgress.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { cancel(true); Toast.makeText(mActivity, mActivity.getString(R.string.cancel_download), Toast.LENGTH_SHORT).show(); } }); mProgress.show(); }
From source file:org.zywx.wbpalmstar.engine.EDownloadDialog.java
private void init(String inUrl) { url = inUrl;/* w w w. j av a 2 s . c o m*/ String suffix = makeFileSuffix(url); MimeTypeMap mtm = MimeTypeMap.getSingleton(); mimetype = mtm.getMimeTypeFromExtension(suffix); if (null == mimetype) { } setProgress(0); setIcon(EResources.icon); setCancelable(false); setTitle(""); setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); setMax(100); setButton("?", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { mFromStop = true; stopDownload(); } }); }
From source file:org.gnucash.android.export.ExporterAsyncTask.java
@Override protected void onPreExecute() { super.onPreExecute(); mProgressDialog = new ProgressDialog(mContext); mProgressDialog.setTitle(R.string.title_progress_exporting_transactions); mProgressDialog.setIndeterminate(true); mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) { mProgressDialog.setProgressNumberFormat(null); mProgressDialog.setProgressPercentFormat(null); }/*from w w w . jav a 2s . c o m*/ mProgressDialog.show(); }
From source file:com.softminds.matrixcalculator.OperationFragments.TraceFragment.java
@Override public void onListItemClick(ListView l, View v, int position, long id) { ProgressDialog progressDialog = new ProgressDialog(getContext()); progressDialog.setMessage(getString(R.string.Calculating)); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setIndeterminate(true); progressDialog.setCanceledOnTouchOutside(false); progressDialog.show();// w w w.j av a2s . co m RunToGetTrace(position, progressDialog); }
From source file:eu.codeplumbers.cosi.api.tasks.SyncDocumentTask.java
public SyncDocumentTask(Activity activity) { this.activity = activity; result = "";/*from www .j a va 2 s .co m*/ Device device = Device.registeredDevice(); // cozy register device url this.url = device.getUrl() + "/ds-api/data/"; // concatenate username and password with colon for authentication final String credentials = device.getLogin() + ":" + device.getPassword(); authHeader = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP); dialog = new ProgressDialog(activity); dialog.setCancelable(false); dialog.setProgress(0); dialog.setMax(100); dialog.setMessage("Please wait"); dialog.setIndeterminate(false); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.show(); }