Called by TransitionManager to play the transition. This calls
createAnimators() to set things up and create all of the animations and then
runAnimations() to actually start the animations.
341
void playTransition(@NonNull ViewGroup sceneRoot) {
        mStartValuesList = new ArrayList<TransitionValues>();
        mEndValuesList = new ArrayList<TransitionValues>();
        matchStartAndEnd(mStartValues, mEndValues);

        ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
        synchronized (sRunningAnimators) {
            int numOldAnims = runningAnimators.size();
            Object windowId = ViewUtils.getWindowId(sceneRoot);
            for (int i = numOldAnims - 1; i >= 0; i--) {
                Animator anim = runningAnimators.keyAt(i);
                if (anim != null) {
                    AnimationInfo oldInfo = runningAnimators.get(anim);
                    if (oldInfo != null && oldInfo.view != null && oldInfo.windowId == windowId) {
                        TransitionValues oldValues = oldInfo.values;
                        View oldView = oldInfo.view;
                        TransitionValues startValues = getTransitionValues(oldView, true);
                        TransitionValues endValues = getMatchedTransitionValues(oldView, true);
                        if (startValues == null && endValues == null) {
                            endValues = mEndValues.viewValues.get(oldView);
                        }
                        boolean cancel = (startValues != null || endValues != null) &&
                                oldInfo.transition.isTransitionRequired(oldValues, endValues);
                        if (cancel) {
                            if (anim.isRunning() || AnimatorUtils.isAnimatorStarted(anim)) {
                                if (DBG) {
                                    Log.d(LOG_TAG, "Canceling anim " + anim);
                                }
                                anim.cancel();
                            } else {
                                if (DBG) {
                                    Log.d(LOG_TAG, "removing anim from info list: " + anim);
                                }
                                runningAnimators.remove(anim);
                            }
                        }
                    }
                }
            }
        }

        createAnimators(sceneRoot, mStartValues, mEndValues, mStartValuesList, mEndValuesList);
        runAnimators();
    }
524793
public void start(GVROnFinish finishCallback)
    {
        if (mAnimations.size() == 0)
        {
            return;
        }
        mIsRunning = true;
        for (int i = 0; i < mAnimations.size(); ++i)
        {
            GVRAnimation anim = mAnimations.get(i);
            anim.reset();
            if (i == 0)
            {
                anim.setOnFinish(finishCallback);
            }
            else
            {
                anim.setOnFinish(null);
            }
            anim.start(getGVRContext().getAnimationEngine());
        }
    }
411470
private Animator createAnimation(final View view, float startAlpha, float endAlpha, @Nullable TransitionValues values) {
        final float curAlpha = view.getAlpha();
        startAlpha = curAlpha * startAlpha;
        endAlpha = curAlpha * endAlpha;

        if (values != null && values.values.containsKey(PROPNAME_ALPHA)) {
            float savedAlpha = (Float) values.values.get(PROPNAME_ALPHA);
            // if saved value is not equal curAlpha it means that previous
            // transition was interrupted and in the onTransitionEnd
            // we've applied endListenerAlpha. we should apply proper value to
            // continue animation from the interrupted state
            if (savedAlpha != curAlpha) {
                startAlpha = savedAlpha;
            }
        }

        view.setAlpha(startAlpha);
        final ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.ALPHA, endAlpha);
        final FadeAnimatorListener listener = new FadeAnimatorListener(view, curAlpha);
        anim.addListener(listener);
        addListener(new TransitionListenerAdapter() {
            @Override
            public void onTransitionEnd(@NonNull Transition transition) {
                view.setAlpha(curAlpha);
                transition.removeListener(this);
            }
        });
        return anim;
    }
518683
public Navigate animate(@Nullable Transitions transition) {
        if (application != null) {
            throw new IllegalArgumentException(
                    "You can't animate activity transition when using application context");
        }
        this.transition = transition;
        return this;
    }
657668
function main() {
    var TIME_STEP_MS = 20;
    var frameCount = sozi.presentation.frames.length;
    var imageIndex = 0;

    document.querySelector(".sozi-blank-screen").style.display = "none";
    
    sozi.presentation.frames.forEach(function (currentFrame, currentFrameIndex) {
        console.log("Exporting frame: " + (currentFrameIndex + 1));

        sozi.player.jumpToFrame(currentFrameIndex);

        // Generate images for the duration of the current frame
        for (var timeMs = 0; timeMs < currentFrame.timeoutMs; timeMs += TIME_STEP_MS, imageIndex ++) {
            window.callPhantom(imageIndex);
        }

        // Generate images for the transition to the next frame.
        // If the last frame has a timeout enabled, transition to the first frame.
        if (currentFrameIndex < frameCount - 1 || currentFrame.timeoutEnable) {
            if (typeof sozi.player.nextFrameIndex === "number") {
                sozi.player.targetFrameIndex = sozi.player.nextFrameIndex; // Sozi < 18
            }
            else {
                sozi.player.targetFrame = sozi.player.nextFrame; // Sozi 18
            }

            sozi.viewport.cameras.forEach(function (camera) {
                var lp = sozi.player.targetFrame.layerProperties[camera.layer.index];
                sozi.player.setupTransition(camera, sozi.Timing[lp.transitionTimingFunction], lp.transitionRelativeZoom, lp.transitionPath, false);
            });

            for (timeMs = 0; timeMs < sozi.player.targetFrame.transitionDurationMs; timeMs += TIME_STEP_MS, imageIndex ++) {
                sozi.player.onAnimatorStep(timeMs / sozi.player.targetFrame.transitionDurationMs);
                window.callPhantom(imageIndex);
            }
        }
    });
}
23670
private void setUpAnimations() {
        slideUp = AnimationUtils.loadAnimation(this,
                R.anim.slide_up);
        slideDown = AnimationUtils.loadAnimation(this,
                R.anim.slide_down);
    }
250717
public void start(String name)
    {
        GVRAnimator anim = findAnimation(name);

        if (name.equals(anim.getName()))
        {
            start(anim);
            return;
        }
    }
994472
function start() {
      var _this = this;

      if (Glide.settings.autoplay) {
        if (isUndefined(this._i)) {
          this._i = setInterval(function () {
            _this.stop();

            Components.Run.make('>');

            _this.start();
          }, this.time);
        }
      }
    }
74754
private void deliverFaderStartCommand(Set<Integer> playersToStart, Set<Integer> playersToStop) {
        for (final FaderStartListener listener : getFaderStartListeners()) {
            try {
                listener.fadersChanged(playersToStart, playersToStop);
            } catch (Throwable t) {
                logger.warn("Problem delivering fader start command to listener", t);
            }
        }
    }
1191538
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.bouncing_balls);
        LinearLayout container = (LinearLayout) findViewById(R.id.container);
        container.addView(new MyAnimationView(this));
    }
585914
def play(opts = {}, &done_proc)

      animation = opts[:animation]
      loop = opts[:loop]
      flip = opts[:flip]

      if !@playing || (animation != @playing_animation && animation != nil) || flip != @flip

        @playing = true
        @playing_animation = animation || :default
        frames = @animations[@playing_animation]
        flip_sprite(flip)
        @done_proc = done_proc

        case frames
        # When animation is a range, play through frames horizontally
        when Range
          @first_frame   = frames.first || @defaults[:frame]
          @current_frame = frames.first || @defaults[:frame]
          @last_frame    = frames.last
        # When array...
        when Array
          @first_frame   = 0
          @current_frame = 0
          @last_frame    = frames.length - 1
        end

        # Set looping
        @loop = loop == true || @defaults[:loop] ? true : false

        set_frame
        restart_time
      end
    end
640689
function (state, subPropKey, key, transitionCfg, done) {
        var el = this._el;
        var stateObj = subPropKey ? state[subPropKey] : state;
        var elObj = subPropKey ? el[subPropKey] : el;
        var availableProp = stateObj && (key in stateObj)
            && elObj && (key in elObj);

        var transitionAnimators = this._transitionAnimators;
        if (availableProp) {
            var obj = {};
            if (stateObj[key] === elObj[key]) {
                return 0;
            }
            obj[key] = stateObj[key];

            var animator = el.animate(subPropKey)
                .when(transitionCfg.duration, obj)
                .delay(transitionCfg.dealy)
                .done(function () {
                    var idx = zrUtil.indexOf(transitionAnimators, 1);
                    if (idx > 0) {
                        transitionAnimators.splice(idx, 1);
                    }
                    done();
                })
                .start(transitionCfg.easing);
            transitionAnimators.push(animator);

            return 1;
        }
        return 0;
    }
207750
public function on_start()
    {
        $this->registerServiceProvider();
        $this->registerParsers();
        $this->app->make('director')->addSubscriber($this->app->make(EventSubscriber::class));
        if ($this->app->isRunThroughCommandLineInterface()) {
            $this->registerCLICommands();
        } else {
            $this->registerAssets();
            $this->registerRoutes();
        }
    }
911663
private void startAnimation() {
        ValueAnimator animator = ValueAnimator.ofFloat(1.0f);
        ArrayList<NameValuesHolder> nameValueList =
                (ArrayList<NameValuesHolder>) mPendingAnimations.clone();
        mPendingAnimations.clear();
        int propertyMask = 0;
        int propertyCount = nameValueList.size();
        for (int i = 0; i < propertyCount; ++i) {
            NameValuesHolder nameValuesHolder = nameValueList.get(i);
            propertyMask |= nameValuesHolder.mNameConstant;
        }
        mAnimatorMap.put(animator, new PropertyBundle(propertyMask, nameValueList));
        animator.addUpdateListener(mAnimatorEventListener);
        animator.addListener(mAnimatorEventListener);
        if (mStartDelaySet) {
            animator.setStartDelay(mStartDelay);
        }
        if (mDurationSet) {
            animator.setDuration(mDuration);
        }
        if (mInterpolatorSet) {
            animator.setInterpolator(mInterpolator);
        }
        animator.start();
    }
46951
private void startAnimation() {
        initAnimation();
        sAnimations.get().add(this);
        if (mStartDelay > 0 && mListeners != null) {
            // Listeners were already notified in start() if startDelay is 0; this is
            // just for delayed animations
            ArrayList<AnimatorListener> tmpListeners =
                    (ArrayList<AnimatorListener>) mListeners.clone();
            int numListeners = tmpListeners.size();
            for (int i = 0; i < numListeners; ++i) {
                tmpListeners.get(i).onAnimationStart(this);
            }
        }
    }
492345
function () {
    this.updateConfig();
    this.animation.began = true;
    this.time = 0;
    this.animationIsPlaying = true;
    this.stopRelatedAnimations();
    this.el.emit('animationbegin', this.eventDetail, false);
  }
215359
void startAnimation() {
        if (getVisibility() != VISIBLE) {
            return;
        }

        if (mIndeterminateDrawable instanceof Animatable) {
            mShouldStartAnimationDrawable = true;
            mAnimation = null;
        } else {
            if (mInterpolator == null) {
                mInterpolator = new LinearInterpolator();
            }

            mTransformation = new Transformation();
            mAnimation = new AlphaAnimation(0.0f, 1.0f);
            mAnimation.setRepeatMode(mBehavior);
            mAnimation.setRepeatCount(Animation.INFINITE);
            mAnimation.setDuration(mDuration);
            mAnimation.setInterpolator(mInterpolator);
            mAnimation.setStartTime(Animation.START_ON_FIRST_FRAME);
        }
        postInvalidate();
    }