I would like to obtain the transformation matrix of an animation to calculate the position of the view that was animated.
It seems the Animation class has a method called getTransformation that can be used to obtain the transformation applied to the view.
However, if I use getTransformation before starting the animation I obtain the identity matrix. And if I use it like this:
public void onAnimationEnd(Animation animation) {
Transformation t = new Transformation();
animation.getTransformation(animation.getDuration(), t);
}
The program enters an infite loop because getTransformation seems to trigger onAnimationEnd (why?).
How should I use getTransformation to obtain the transformation matrix of an animation? Is there another way to do this?