tags:

views:

137

answers:

2

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 TranslateAnimation and ScaleAnimation over 1 second with setFillAfter(true).

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

A: 

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

Reflog
This won't work, since the view's location itself is not updated at the end of an animation.
bgm
A: 

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

bgm
Can you post sample code? Thanks!
hgpc