I have an ObjectAnimator:
cloudAnim2 = ObjectAnimator.ofFloat(cloud2ImageView, "x",500, 1000); cloudAnim2.setDuration(3000); cloudAnim2.setRepeatCount(ValueAnimator.INFINITE); cloudAnim2.setRepeatMode(ValueAnimator.RESTART); cloudAnim2.start(); cloudAnim2.addListener(new AnimatorListener() { @Override public void onAnimationCancel(Animator animation) {} @Override public void onAnimationEnd(Animator animation) {} @Override public void onAnimationRepeat(Animator animation) {} @Override public void onAnimationStart(Animator animation) {} });
As you can see, the cloud will start at position 500 and will animate to position 1000, and then the animation will repeat.
The problem is that the animation becomes slower, as it is near its end. I mean that the speed is not always the same.
I want the speed to be the same. How can I do that?
thanks
source share