Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Android Kotlin Tint LottieAnimationView JSON
/**
* 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