Sets the maximum progress that the animation will end at when playing or looping.
1211
public void setMaxProgress(@FloatRange(from = 0f, to = 1f) final float maxProgress) {
    if (composition == null) {
      lazyCompositionTasks.add(new LazyCompositionTask() {
        @Override
        public void run(LottieComposition composition) {
          setMaxProgress(maxProgress);
        }
      });
      return;
    }
    setMaxFrame((int) MiscUtils.lerp(composition.getStartFrame(), composition.getEndFrame(), maxProgress));
  }
537076
function() {
    var self = this;

    // Loop through all active sounds and update their progress bar.
    for (var i=0; i<self.sounds.length; i++) {
      var id = parseInt(self.sounds[i].id, 10);
      var offset = self._sprite[self.sounds[i].dataset.sprite][0];
      var seek = (self.sound.seek(id) || 0) - (offset / 1000);
      self.sounds[i].style.width = (((seek / self.sound.duration(id)) * 100) || 0) + '%';
    }

    requestAnimationFrame(self.step.bind(self));
  }
640169
def update_max_progress(self):
        
        self.update_progress()
        if self.leafnode:
            self.max_leaf_progress = self.progress
        else:
            self.max_leaf_progress = max(self.lower.max_leaf_progress, self.greater.max_leaf_progress)
1298800
private void animateExpand() {
        mCloseBtn.setVisibility(View.VISIBLE);
        mMidContainer.setVisibility(View.VISIBLE);
        mRightContainer.setVisibility(View.VISIBLE);
        mLeftContainer.setVisibility(View.VISIBLE);

        setButtonsVisibleForPreHC();

        ANIMATION_COUNTER = 0;

        ViewPropertyAnimator.animate(mMidContainer).setDuration(ANIMATION_DURATION).translationYBy(-TRANSLATION_Y).setInterpolator(overshoot).setListener(ON_EXPAND_COLLAPSE_LISTENER);
        ViewPropertyAnimator.animate(mRightContainer).setDuration(ANIMATION_DURATION).translationYBy(-TRANSLATION_Y).translationXBy(TRANSLATION_X).setInterpolator(overshoot).setListener(ON_EXPAND_COLLAPSE_LISTENER);
        ViewPropertyAnimator.animate(mLeftContainer).setDuration(ANIMATION_DURATION).translationYBy(-TRANSLATION_Y).translationXBy(-TRANSLATION_X).setInterpolator(overshoot).setListener(ON_EXPAND_COLLAPSE_LISTENER);
    }
1308553
public void animateProgress(int start, int end, int duration) {
        List<Boolean> list = new ArrayList<>();
        list.add(true);
        mCirclePieceFillList = list;
        setProgress(0);
        AnimatorSet set = new AnimatorSet();
        set.playTogether(Glider.glide(Skill.QuadEaseInOut, duration, ObjectAnimator.ofFloat(this, "progress", start, end)));
        set.setDuration(duration);
        set = addListenersToSet(set);
        set.start();
    }
524571
public void autoTune(Long progress) {
    // LOG.info ("Called auto tune with progress " + progress);

    if (lastAction == ACTION.NOOP) {
      // We did not take any action last time
      if (prevProgress == -1) {
        // The first time around when we are called
        doAction(ACTION.INCREASE, autoTuneFactor, progress);
      } else if (moreThanNum(progress, prevProgress, progressBound)) {
        // We have seen a sudden increase in progress in the steady state (NOOP) try to push
        // the max spout pending limit even more
        doAction(ACTION.INCREASE, autoTuneFactor, progress);
      } else if (lessThanNum(progress, prevProgress, progressBound)) {
        // We have seen a sudden drop in progress in the steady state try to decrease
        // the max spout pending proportionately to see if we can introduce an improvement
        // in progress;
        doAction(ACTION.DECREASE,
            Math.max((prevProgress - progress) / (float) prevProgress, autoTuneFactor), progress);
      } else {
        ++callsInNoop;
        // If the progress remains the same then once in a while try increasing the
        // max spout pending.
        if (callsInNoop >= NOOP_THRESHOLD) {
          doAction(speculativeAction, autoTuneFactor, progress);
          speculativeAction =
              speculativeAction == ACTION.INCREASE ? ACTION.DECREASE : ACTION.INCREASE;
        }
      }
    } else if (lastAction == ACTION.INCREASE) {
      if (moreThanNum(progress, prevProgress, autoTuneFactor - progressBound)) {
        // Our increase last time did result in a commisurate increase. Increase even more
        doAction(ACTION.INCREASE, autoTuneFactor, progress);
      } else if (lessThanNum(progress, prevProgress, progressBound)) {
        // Our increase last time actually resulted in a decrease.
        // Check how much we decreased. If our decrease was disproportionate
        // decrease accordingly.
        float drop = Math.max((prevProgress - progress) / (float) prevProgress, autoTuneFactor);
        if (drop > autoTuneFactor) {
          doAction(ACTION.DECREASE, drop, progress);
        } else {
          doAction(ACTION.RESTORE, autoTuneFactor, progress);
        }
      } else {
        // Our increase last time did not really change anything. So restore.
        doAction(ACTION.RESTORE, autoTuneFactor, progress);
      }
    } else if (lastAction == ACTION.DECREASE) {
      if (moreThanNum(progress, prevProgress, progressBound)) {
        // We actually saw an increase in progress. So decrease more
        doAction(ACTION.DECREASE, autoTuneFactor, progress);
      } else {
        // Hold off any decision. We will take any decision next time around.
        doAction(ACTION.NOOP, autoTuneFactor, progress);
      }
    } else if (lastAction == ACTION.RESTORE) {
      // Lets ignore the effects of the restore and wait out for the next cycle
      doAction(ACTION.NOOP, autoTuneFactor, progress);
    }
  }
339000
def finish(self):
        ''

        self.finished = True
        self.update(self.maxval)
        self.fd.write('\n')
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)
67156
def _finishAnimation(self):
        
        self.setCurrentIndex(self._nextIndex)
        self.widget(self._lastIndex).hide()
        self.widget(self._lastIndex).move(self._lastPoint)
        self._active = False
        
        if not self.signalsBlocked():
            self.animationFinished.emit()
213921
function () {
    var data = this.data;

    this.updateConfig();
    this.animationIsPlaying = false;
    this.animation = anime(this.config);
    this.animation.began = true;

    this.removeEventListeners();
    this.addEventListeners();

    // Wait for start events for animation.
    if (!data.autoplay || data.startEvents && data.startEvents.length) { return; }

    // Delay animation.
    if (data.delay) {
      setTimeout(this.beginAnimation, data.delay);
      return;
    }

    // Play animation.
    this.beginAnimation();
  }
961235
function() {
        var done = true,
            anim;
        for (anim in Transition._running) {
            if (Transition._running[anim]._runFrame) {
                done = false;
                Transition._running[anim]._runFrame();
            }
        }

        if (done) {
            Transition._stopTimer();
        }
    }
42309
@Override
    public void updateProgress(int progress, int currentZoomLevel, int zoomMin, int zoomMax) {
        if (progressBar != null) {
            progressBar.setProgress(progress);
        }
    }
1179443
private void setProgressBarValue(int value, int maximum) {

    this.progressBar.setIndeterminate(false);

    if (this.progressBar.getMaximum() != maximum) {
      this.progressBar.setMaximum(maximum);
    }

    this.progressBar.setValue(value);

  }
871845
public void animateProgressFill(int animateTo) {
        mAnimationHandler.removeMessages(0);
        if (animateTo > mMax || animateTo < 0) {
            throw new IllegalArgumentException(
                    String.format("Animation progress (%d) is greater than the max progress (%d) or lower than 0 ", animateTo, mMax));
        }
        mAnimationHandler.setAnimateTo(animateTo);
        mAnimationHandler.sendEmptyMessage(0);
        invalidate();
    }
115559
synchronized void setLimits(int txnsPerSec, int maxOutstanding) {
        m_autoTune = false;
        /*
         * If the rate limit is some reasonably low value then go through the effort
         * of rate limiting
         */
        if (txnsPerSec < Integer.MAX_VALUE / 2) {
            m_doesAnyTuning = true;
        }
        m_targetTxnsPerSecond = txnsPerSec;
        m_maxOutstandingTxns = maxOutstanding;
        m_outstandingTxnsSemaphore.drainPermits();
        m_outstandingTxnsSemaphore.release(maxOutstanding);
    }
849517
@SuppressLint("DefaultLocale")
    @Override
    public void setProgress(int progress) {
        if (getParent() instanceof BootstrapProgressBarGroup){
            this.userProgress = 0;
            setMaxProgress(progress);
        }else {
            if (progress < 0 || progress > maxProgress) {
                throw new IllegalArgumentException(
                        String.format("Invalid value '%d' - progress must be an integer in the range 0-%d", progress, maxProgress));
            }
        }

        this.userProgress = progress;

        if (animated) {
            startProgressUpdateAnimation();
        }
        else {
            this.drawnProgress = progress;
            invalidate();
        }

        ViewParent parent = getParent();
        if (parent != null) {
            if (parent instanceof BootstrapProgressBarGroup) {
                BootstrapProgressBarGroup parentGroup = (BootstrapProgressBarGroup) parent;
                parentGroup.onProgressChanged(this);
            }
        }
    }
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();
  }
573488
public void setDuration(float start, float end)
    {
        for (GVRAnimation anim : mAnimations)
        {
            anim.setDuration(start,end);
        }
    }