Get location of object when animation is completed in android

Is there any way to find out the final location of my animated “object” after the animation? Suppose I am an ImageView animation with a location in parent quality (0.0 - 20.20) using TranslateAnimation and ScaleAnimation for 1 second using setFillAfter (true).

How to find the final location of this "object" (since the location itself "View" does not move)? I need to continue the animation from this point based on user input.

+4
source share
2 answers

I figured it out - use getTransformation in the animation and apply the matrix to the source rectangle to get the final destination.

0
source

hook up the AnimationStopped event, and then request the location from the animated view.

0
source

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


All Articles