Reputation: 345
I have an translateAnimation where an image from the top and bottom of the screen meet up in the center after a button is pressed. However they snap back to their original position as soon as they reach the center of the screen.
My goal is to have them remain in the center of the screen until the screen is tapped and then they would return to their original positions at the same rate at which they moved to the center without that snappy movement that they are currently demonstrating.
What can I do to implement this?
Upvotes: 0
Views: 711
Reputation: 6334
you should use
animation.setFillEnabled(true);
animation.setFillAfter(true);
When set to true, the animation transformation is applied after the animation is over.
Upvotes: 1