Skip to content

Commit

Permalink
fix(android): lottie does not support clearing animation (src=null)
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jan 13, 2023
1 parent 000e6ab commit 024b7d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lottie.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ export class LottieView extends LottieViewBase {
[srcProperty.setNative](src: string) {
const view = this.nativeViewProtected;
if (!src) {
view.setAnimation(null);
// lottie does not support "clearing the animation"
// view.setAnimation(null);
} else if (src[0] === '{') {
view.setAnimationFromJson(src, null);
} else if (src.startsWith(Utils.RESOURCE_PREFIX)) {
Expand Down

0 comments on commit 024b7d5

Please sign in to comment.