Binding Adapters. ͪΖΜCustom BindingAdapterͬͯΔ • Today I’d like to introduce Adapter example called LottieAnimationViewExt.kt in Kyash app. ࠓศརͳKyashΞϓϦͰ͍ͬͯΔLottieAnimationViewExt.kt ͱ͍͏ AdaptersΛհ͢Δ
/> • custom_lottie_autoPlay If it’s true, the animation plays automatically when the view is shown. trueͩͬͨΒView͕දࣔ͞Εͨ࣌ʹࣗಈతʹ࠶ੜ͞ΕΔ • custom_lottie_fileName lottie animation json file path. lottieΞχϝʔγϣϯͷjsonϑΝΠϧͷpath
], 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.