I have an ImageView that I want to animate when a user clicks on it.
So, I ended up with this simple solution:
public void onClick(View v) {
imageView.animate()
.rotationX(360).rotationY(360)
.setDuration(1000)
.setInterpolator(new LinearInterpolator());
}
It works just fine, but only FIRST TIME (the first click plays the animation, after which the animation does not work at all).
How can i fix this?
source
share