Closed oOJohn6Oo closed 6 months ago
Link to fork with a repro in the issue-repro module issue-repo, test APKs is in the release section.
Describe the bug
I can switch between normal Drawable and LottieDrawable with version 6.2.0, just like Twitter's Like button.
Like
binding.animationView.setOnClickListener { if((it as LottieAnimationView).drawable is LottieDrawable){ it.setImageDrawable(ContextCompat.getDrawable(this, R.mipmap.ic_launcher)) }else{ it.setAnimation(R.raw.heart) it.playAnimation() } }
https://github.com/airbnb/lottie-android/blob/fe412fa6c2a5612b4379538e9a9bea14bb415569/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java#L608-L612
Changes to #2441 prevent us from setting the same animation for LottieAnimationView, but it also prevents us from replaying the animation.
I tried set frame to 0 then playAnimation(), but it didn't work.
playAnimation()
Steps To Reproduce Steps to reproduce the behavior:
heart
What I want to know
Link to fork with a repro in the issue-repro module issue-repo, test APKs is in the release section.
Describe the bug
I can switch between normal Drawable and LottieDrawable with version 6.2.0, just like Twitter's
Like
button.https://github.com/airbnb/lottie-android/blob/fe412fa6c2a5612b4379538e9a9bea14bb415569/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java#L608-L612
Changes to #2441 prevent us from setting the same animation for LottieAnimationView, but it also prevents us from replaying the animation.
I tried set frame to 0 then
playAnimation()
, but it didn't work.Steps To Reproduce Steps to reproduce the behavior:
heart
animation should start playing.heart
, it should changes to app logo with no animation.What I want to know