Can I change the final value of an ObjectAnimator when starting an animation?

I have an object animator running, and I want to change the final value sometimes when the animation starts, but without stopping or restarting it.

How can this be achieved? I can not find the information on google.

SAMPLE:

XMovement = ObjectAnimator.ofFloat(view, "x", startX, endX); XMovement.setDuration(ANIMATION_TIME); XMovement.start(); 

and I want to change the endX value in real time when the animation starts.

thanks

+6
source share

Source: https://habr.com/ru/post/982330/


All Articles