ProgressDialog setSecondaryProgress - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ProgressDialog setSecondaryProgress method.

This code example shows how to use the following methods:setCancelMessage, setCancelable, show, setIndeterminate, setMessage
 
    @Override 
	protected void onProgressUpdate(IProgress... p) {
		if(pDialog.isIndeterminate()) {	//Dismiss Indeterminate progress dialog and display the determinate one.
			pDialog.dismiss();
			pDialog = new ProgressDialog(this._context);
			pDialog.setTitle(p[0].getDescription());
			pDialog.setIndeterminate(false);
			pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
			pDialog.setCancelable(p[0].getCancelable()); 
			if(p[0].getCancelable()) {
				Message cancelMessage = _cancelHandler.obtainMessage(0);
				cancelMessage.setData(new BundleBuilder().putProxy("progress", p[0]).create());
				pDialog.setCancelMessage(cancelMessage);
			} 
			pDialog.show();
		} 
		pDialog.setMessage("Operation " + p[0].getOperation() + "/" + p[0].getOperationCount() + " - " + p[0].getOperationDescription() + " - " + p[0].getOperationPercent() + "%  remaining " + p[0].getTimeRemaining() + "secs");
		pDialog.setProgress(p[0].getPercent());
		pDialog.setSecondaryProgress(p[0].getOperationPercent());

5
CodeRank
This code example shows how to use the following methods:setProgress, setSecondaryProgress
	 
	/** 
	 * Runs after publishProgress and updates the UI percentage 
	 */ 
	protected void onProgressUpdate(Integer... progress) {
		progressDialog.setSecondaryProgress(progress[0]);
		progressDialog.setProgress(progress[0]);
    } 
	 
	/** 
	 * Executed when AsyncTask is finished and passes back the final result 
	 */ 
	@Override 
	protected void onPostExecute(BuildListResult result) 
	{ 
		progressDialog.dismiss();
		responder.finishedBuildingList(result);
	} 
	 
	/** 
5
CodeRank
This code example shows how to use the following methods:setSecondaryProgress