Skip to content Skip to sidebar Skip to footer

Get Location Of Object When Animation Is Complete In Android

Is there a way to find out the final location of my animated 'object' after the animation? Let's say I am animating an ImageView with location in parent as (0,0 - 20,20) using Tran

Solution 1:

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

Solution 2:

I figured it out - use getTransformation on the Animation and apply the Matrix to the initial Rectangle, to obtain the final destination.

Post a Comment for "Get Location Of Object When Animation Is Complete In Android"