Created
January 7, 2019 08:27
-
-
Save bitvale/5d99dbcf26c7d1c8567e3ab1eb7deb51 to your computer and use it in GitHub Desktop.
For Medium article "The power of Android Porter/Duff Mode"
This file contains hidden or 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
private var animator = ValueAnimator.ofFloat(0f, 1f).apply { | |
addUpdateListener { | |
val value = it.animatedValue as Float | |
angle = lerp(0f, FULL_CIRCLE, value) | |
} | |
interpolator = CustomSpringInterpolator(INTERPOLATOR_FACTOR) | |
repeatMode = ValueAnimator.RESTART | |
repeatCount = ValueAnimator.INFINITE | |
duration = ANIMATION_DURATION | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment