I am using Jake Wharton's nineoldandroids lib for implementing animations compatible with pre Honeycomb devices. the lib: http://nineoldandroids.com/
for some reason, setting an AnimationSet interpolator does not seem to work. I googled it and I did not find any reference to using setInterpolator() with nineoldandroids (nothing that either confirms or denies setInterpolator() support)
Does anyone know if it is supported? and if it is, is there a certain way I should use it to make it work?
Code example:
AnimatorSet set = new AnimatorSet();
set.setInterpolator(new BounceInterpolator());
set.playTogether(
ObjectAnimator.ofFloat(view, "translationX", 100f)
);
set.setDuration(1000).start();
It does not matter what interpolator I set, it is always using AccelerateDecelerateInterpolator
Late, but I just ran into the same issue.
You have to call setInterpolator()
after you've added the animations (after playTogether()
or similar), because it'll only apply the interpolator to animations in the AnimationSet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With