Slide 11
Slide 11 text
LottieAnimationViewExt.kt
@BindingAdapter(
value = [
"custom_lottie_fileName",
"custom_lottie_autoPlay",
"custom_lottie_onAnimationEnd"
],
requireAll = false
)
fun LottieAnimationView.setAnimation(
jsonPath: String?,
autoStart: Boolean?,
animationListener: SimpleAnimatorListener?
) {
…
}
interface SimpleAnimatorListener {
fun onAnimationEnd()
}
If not required all, it’s okay to make
Parameters Nullable.