Code example for ProgressDialog

Methods: setTitlesetCancelablesetCanceledOnTouchOutsidesetOnCancelListenershowsetMessage

0
	@Override 
	public void onPreExecute() { 
		Log.w(idTag, Logging.getCurrentMethodName());
		registerAsErrorListener(); 
		prepareBeforeRunning(); 
		progress = new ProgressDialog(context);
		progress.setTitle("");
		progress.setMessage("Preparing media...");
		progress.setCanceledOnTouchOutside(false);
		progress.setCancelable(true);
		progress.setOnCancelListener(new DialogInterface.OnCancelListener() {
			public void onCancel(DialogInterface dialog) {
				cancelledByUser = true;
				PlayMediaTask.this.cancel(true);
			} 
		}); 
		progress.show();
	} 
 
	@Override 
	protected Boolean doInBackground(Void... params) {
		Log.w(idTag, Logging.getCurrentMethodName());
Stop searching for code, let great code find you!  Add Codota to your java IDE