I'm trying to move an ImageView down using ObjectAnimator. The setDuration() method doesn't seem to impact the duration of the animation. I can't set this animation in the XML as I want to play this dynamically.
ObjectAnimator an= ObjectAnimator.ofFloat(img, View.TRANSLATION_Y, 0, 100);
an.setDuration(5000);
an.start();
Sorta off topic here but say I want to play more than one of those ObjectAnimation after each other, Is there a way to do that? I've looked at the Animator set but I wasn't sure if it would move the actual object like an Object Animator, instead of just appearing as so as in the TranslateAnimation.
Thanks in advance!
Maybe you are testing on Samsung device? In this case, under developer options there is the option Animator duration scale that is set to off by default. If you switch to the normal value you can see the animations.
Hope this help.
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