Created
April 6, 2017 17:04
-
-
Save bigstark/6dc663f50907a79adee26adc9aeb19f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void start() { | |
ValueAnimator animator = ValueAnimator.ofInt(0, 1); | |
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { | |
@Override | |
public void onAnimationUpdate(ValueAnimator animation) { | |
frame = animation.getAnimatedFraction(); | |
postInvalidate(); | |
} | |
}); | |
animator.setDuration(durationRotate); | |
animator.setStartDelay(durationInterval); | |
animator.setRepeatCount(ObjectAnimator.INFINITE); | |
animator.start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment