Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

thenAnimate() method is ignored when used before andAnimate() method #21

Open
shayanzoro opened this issue Jul 11, 2016 · 0 comments
Open

Comments

@shayanzoro
Copy link

thenAnimate() method is ignored when used before andAnimate() method.
in my example the background animation won't be played:

    ViewAnimator
                     //increase play icon's opacity
            .animate(playLogo)
            .alpha(1)
            .startDelay((long) (ANIMATION_DURATION * 0.2f))
            .duration(1)
                     //then fade the background in
            .thenAnimate(background)
            .alpha(0, 1)
            .duration((long) (ANIMATION_DURATION * 0.7f))
            .interpolator(new AccelerateDecelerateInterpolator())
            .onStart(() -> background.setVisibility(View.VISIBLE))
                    //and rotate and scale the play icon & the logo
            .andAnimate(playLogo, varaLogo)
            .rotation(0, -6 * 360)
            .scale(1, 1.25f)
            .startDelay((long) (ANIMATION_DURATION * 0.1f))
            .duration((long) (ANIMATION_DURATION * 0.4f))
            .interpolator(new AccelerateDecelerateInterpolator())
            .onStart(() -> {
                switchIconAndLogoWithDelay();
                startBackgroundAnimation();
            })
                    //after it, scale the logo a bit more
            .thenAnimate(varaLogo)
            .scale(1.25f, 1.35f)
            .duration((long) (ANIMATION_DURATION * 0.4f))
            .start();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant