Appolica / Flubber

Flubber is an elegant solution for making animations in Android. The library is developed and maintained by Appolica.
Apache License 2.0
267 stars 51 forks source link

Scale-Animation is not running #13

Open Yetispapa opened 6 years ago

Yetispapa commented 6 years ago

I use your library to animate a button with the spring interpolator. The button has a initial scaleX and scaleY of zero. So it's not visible. Unfortunately the animation is not running or working so the button is not showing up. This is my code:

            Flubber.with()
                    .animation(Flubber.AnimationPreset.SCALE_X)
                    .animation(Flubber.AnimationPreset.SCALE_Y)
                    .scaleX(0, 1)
                    .scaleY(0, 1)
                    .repeatCount(1)
                    .duration(buttonAnimationDuration)
                    .damping(buttonSpringDamping)
                    .interpolator(Flubber.Curve.SPRING)
                    .velocity(initalSpringVel)
                    .delay(buttonSpringDelay)
                    .autoStart(true)
                    .createFor(myButton);

I also tried calling the animatino with the .start() call and not with the .autoStart(true) but it does not work either.

This is the native animation call which works: myButton.animate().scaleX(1).scaleY(1).setDuration(buttonAnimationDuration).setStartDelay(buttonSpringDelay).start();

Can you help me here. Thank you

dpetrov-appolica commented 3 years ago

I just copy/paste your code and it's working fine here. Check out your damping, duration, velocity Can you give more information which device and android version you use.