Created
September 11, 2019 14:07
-
-
Save Andrej1A/336f917140409a027cf8356992ea2564 to your computer and use it in GitHub Desktop.
Android Kotlin Tint LottieAnimationView JSON
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
/** | |
* Tint LottieAnimationView | |
*/ | |
private fun LottieAnimationView.tintColor(@ColorInt tintColor: Int) { | |
addValueCallback( | |
KeyPath("**"), | |
LottieProperty.COLOR_FILTER, | |
{ PorterDuffColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP) } | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment