Set the progress to a specific value,
the bar will smoothly animate until that value

@param progress the progress between 0 and 1
421985
public void setProgress(float progress) {
    if (isSpinning) {
      mProgress = 0.0f;
      isSpinning = false;

      runCallback();
    }

    if (progress > 1.0f) {
      progress -= 1.0f;
    } else if (progress < 0) {
      progress = 0;
    }

    if (progress == mTargetProgress) {
      return;
    }

    // If we are currently in the right position
    // we set again the last time animated so the
    // animation starts smooth from here
    if (mProgress == mTargetProgress) {
      lastTimeAnimated = SystemClock.uptimeMillis();
    }

    mTargetProgress = Math.min(progress * 360.0f, 360.0f);

    invalidate();
  }
1365775
public SuperActivityToast setProgressBarColor(@ColorInt int progressBarColor) {
        if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
            Log.w(getClass().getName(), "SuperActivityToast.setProgressBarColor() requires API " +
                    "21 or newer.");
            return this;
        }
        this.mStyle.progressBarColor = progressBarColor;
        return this;
    }
1372195
private void updateProgressBars(int value) {
        ProgressBar circularProgressBar = getCircularProgressBar();
        ProgressBar horizontalProgressBar = getHorizontalProgressBar();

        if (value == Window.PROGRESS_VISIBILITY_ON) {
            if (mFeatureProgress) {
                int level = horizontalProgressBar.getProgress();
                int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ?
                        View.VISIBLE : View.INVISIBLE;
                horizontalProgressBar.setVisibility(visibility);
            }
            if (mFeatureIndeterminateProgress) {
                circularProgressBar.setVisibility(View.VISIBLE);
            }
        } else if (value == Window.PROGRESS_VISIBILITY_OFF) {
            if (mFeatureProgress) {
                horizontalProgressBar.setVisibility(View.GONE);
            }
            if (mFeatureIndeterminateProgress) {
                circularProgressBar.setVisibility(View.GONE);
            }
        } else if (value == Window.PROGRESS_INDETERMINATE_ON) {
            horizontalProgressBar.setIndeterminate(true);
        } else if (value == Window.PROGRESS_INDETERMINATE_OFF) {
            horizontalProgressBar.setIndeterminate(false);
        } else if (Window.PROGRESS_START <= value && value <= Window.PROGRESS_END) {
            // We want to set the progress value before testing for visibility
            // so that when the progress bar becomes visible again, it has the
            // correct level.
            horizontalProgressBar.setProgress(value - Window.PROGRESS_START);

            if (value < Window.PROGRESS_END) {
                showProgressBars(horizontalProgressBar, circularProgressBar);
            } else {
                hideProgressBars(horizontalProgressBar, circularProgressBar);
            }
        }
    }
1140167
public void setActions(com.google.api.ads.admanager.axis.v201902.ProgressAction[] actions) {
        this.actions = actions;
    }
155527
public void setProgress(int progress) {
        if (progress > mMax || progress < 0) {
            throw new IllegalArgumentException(
                    String.format("Progress (%d) must be between %d and %d", progress, 0, mMax));
        }
        mProgress = progress;
        if (null != mListener) {
            if (mProgress == mMax) {
                mListener.onProgressCompleted();
            } else {
                mListener.onProgressChanged(mProgress, mMax);
            }
        }
        invalidate();
    }
162912
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
    public void enableProgressBar() {
        showProgressBar = true;

        if (searchBoxViewModel != null) {
            progressController = new SearchProgressController(new SearchProgressController.ProgressListener() {
                @Override
                public void onStart() {
                    updateProgressBar(searchBoxViewModel, true);
                }

                @Override
                public void onStop() {
                    updateProgressBar(searchBoxViewModel, false);
                }
            }, progressBarDelay);
        }
    }
271837
def updateProgressBar(self, *args, **kwargs):
        '''
         
        '''
        value = kwargs.get('progress')
        pb = self.progress_bar
        if value is None:
            return
        if value < 0:
            pb.Pulse()
        else:
            value = min(int(value), pb.GetRange())
            if pb.GetValue() != value:
                # Windows 7 progress bar animation hack
                # http://stackoverflow.com/questions/5332616/disabling-net-progressbar-animation-when-changing-value
                if self.buildSpec['disable_progress_bar_animation'] \
                        and sys.platform.startswith("win"):
                    if pb.GetRange() == value:
                        pb.SetValue(value)
                        pb.SetValue(value - 1)
                    else:
                        pb.SetValue(value + 1)
                pb.SetValue(value)
742474
public void setProgressAndMax(int progress, int max) {
    if (progress > max || progress < 0) {
      throw new IllegalArgumentException(
          String.format("Progress (%d) must be between %d and %d", progress, 0, max));
    } else if (max <= 0) {
      throw new IllegalArgumentException(String.format("Max (%d) must be > 0", max));
    }

    mProgress = progress;
    mMax = max;
    invalidate();
  }
549873
def progress(rest):
	""
	if rest:
		left, right, amount = [piece.strip() for piece in rest.split('|')]
		ticks = min(int(round(float(amount) / 10)), 10)
		bar = "=" * ticks
		return "%s [%-10s] %s" % (left, bar, right)
1012967
private void bindProgressProperty(final ServiceTaskBase<?> task, final DoubleProperty progressProperty) {

        // Perform this binding into the JAT to respect widget and task API
        JRebirth.runIntoJAT("Bind Progress Property to " + task.getServiceHandlerName(),
                            () -> {
                                // Avoid the progress bar to display 100% at start up
                                task.updateProgress(0, 0);
                                // Bind the progress bar
                                progressProperty.bind(task.workDoneProperty().divide(task.totalWorkProperty()));
                            });

    }
889795
function ( progress, seekCom ) {
            if ( progress < 0 ) {
                progress = 0;
            } else if ( progress > 1 ) {
                progress = 1;
            }
    
            this._seekCom = ( seekCom === 'not' )? false : true;
            this._setSeekValue( progress );
            //this._clearDelay();
    
            if ( this._delayTime > 0 ) {
                this._startDelay( this._timerStart, this._delayTime );
            } else {
                this._timerStart();
            }
            return this;
        }
425075
public CocoTask<T> progress(final View progress) {
        if (progress != null) {
            this.progress = new WeakReference<Object>(progress);
        }
        return this;
    }
846038
@Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        Log.d(TAG, "onProgressChanged " + progress);
    }
495015
public void setProgressBar(ProgressBar progressBar, int progress){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "setProgressBar("+progressBar+", "+progress+")");
		}
		
		progressBar = (ProgressBar) waiter.waitForView(progressBar, Timeout.getSmallTimeout());
		setter.setProgressBar(progressBar, progress);
	}
1176253
public ProgressStyle setMax(int value){

        if(mProgressStyle == HORIZONTAL) {

            if (mProgress.isIndeterminate())
                mProgress.setIndeterminate(false);

            mProgress.setMax(value);

            if (!mIsPercentageMode)
                mProgressMax.setText(String.format("%d %s", value, mSuffix));

        }

        return this;
    }
638278
private void onProgress(final int workerNumber, final int workerSize, final List<Long> pointerList, final float progress) {

		if (progressCache == null) {
			progressCache = new ProgressCache(workerSize, (onRealtimeResultListener != null));
		}

		progressCache.setProgress(workerNumber, progress, pointerList);

		if (onProgressListener != null) {
			onProgressListener.onProgress(progressCache.getProgress());
		}

		if (onRealtimeResultListener != null) {
			onRealtimeResultListener.onRealtimeResultListener(progressCache.getProgress(), progressCache.getResultPointers());
		}
	}
1176471
public boolean notifyProgress(double progress) {

    boolean result = true;

    for (ProgressMonitor monitor : this.monitors) {
      if (!monitor.notifyProgress(progress)) {
        result = false;
      }
    }

    return result;

  }