AJ48
AJ48

Reputation: 43

Android Image not rotating after the 1st run using ViewPropertyAnimator

Upvotes: 2

Views: 236

Answers (1)

A Honey Bustard
A Honey Bustard

Reputation: 3493

Use the

.rotationBy(float value)

method instead of the

.rotation(float value)

method. In your case it rotates TO 360f but you want it to rotate BY 360f.

So this code should work :

imageViewA.animate().rotationBy(360f).setDuration(2000);

Upvotes: 1

Related Questions