ProgressDialog getMax - 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 getMax method.

This code example shows how to use the following methods:show, getMax, setMax
        this.mProgressDialog.setMax(value);
    } 
 
    @Override 
    public void showLoading(String message) {
        int maxValue = this.mProgressDialog.getMax();
        this.mProgressDialog.setMax(Math.max(maxValue, 0));
 
        this.mProgressDialog.show();
 
        AppearanceUtils.showToastMessage(this.mContext, message);
    } 
 
    @Override 
    public void hideLoading() { 
        this.mProgressDialog.dismiss();
    } 
 
    @Override 
    public void showSuccess(File file) {
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:dismiss, isShowing, getMax, getProgress, incrementProgressBy
	/** 
	 * If the dialog is still showing, completes the progress bar in this dialog and dismisses it. 
	 * @param dialog 
	 */ 
	public static void finishProgressDialog(ProgressDialog dialog) {
		if(dialog.isShowing()) {
			int diff = dialog.getMax() - dialog.getProgress();
			dialog.incrementProgressBy(diff);
			dialog.dismiss();
		} 
	} 
	 
	/** 
	 * Calculates and returns the remaining progress for this progress dialog. 
	 * @param dialog 
	 * @return 
	 */ 
	public static int getRemainingProgress(ProgressDialog dialog) {
		if(null == dialog) {
			return 0; 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:dismiss, getMax, setMessage, setProgress
			} 
			break; 
		case GeoQuestProgressHandler.MSG_FINISHED:
			if (isLastInChain) {
				if (progressDialog != null) {
					progressDialog.setProgress(progressDialog.getMax());
					progressDialog.setMessage("");
					progressDialog.dismiss();
				} else if (progressBar != null) {
					progressBar.setProgress(progressBar.getMax());
					if (update != null) {
						update.setText("");
					} 
				} 
			} 
			break; 
		case GeoQuestProgressHandler.MSG_ABORT_BY_ERROR:
			if (isLastInChain) {
				if (progressDialog != null) {
					progressDialog.setProgress(0);
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getMax, setMax, setProgress
			pd.show();
		} 
 
		@Override 
		protected void onProgressUpdate(Integer... values) {
			if (pd.getMax() != values[0])
				pd.setMax(values[0]);
			pd.setProgress(values[1]);
		} 
 
		public void setParseResultHandler(ParseResultListener listener) {
			this.listener = listener;
		} 
 
		@Override 
		public void onFaceLoaded(int totalfaces, int currentFace) {
			publishProgress(totalfaces, currentFace);
			 
		} 
 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getMax, setProgress
		 
		if(pb != null){
			pb.setProgress(pb.getMax());
		} 
		if(pd != null){
			pd.setProgress(pd.getMax());
		} 
		 
		if(act != null){
			act.setProgress(9999);
		} 
		 
	} 
 
	@Override 
	public void run() { 
		dismiss(url);
	} 
	 
	public void show(String url){
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related ProgressDialog getMax Questions & Answers: