Skip to content

Commit

Permalink
Make LottieDrawable.setSystemAnimationsAreEnabled public (#2063)
Browse files Browse the repository at this point in the history
Fixes #2052
  • Loading branch information
gpeal committed Apr 23, 2022
1 parent d612830 commit 47745aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
Expand Up @@ -975,7 +975,12 @@ private boolean animationsEnabled() {
return systemAnimationsEnabled || ignoreSystemAnimationsDisabled;
}

void setSystemAnimationsAreEnabled(Boolean areEnabled) {
/**
* Tell Lottie that system animations are disabled. When using {@link LottieAnimationView} or Compose {@code LottieAnimation}, this is done
* automatically. However, if you are using LottieDrawable on its own, you should set this to false when
* {@link com.airbnb.lottie.utils.Utils#getAnimationScale(Context)} is 0.
*/
public void setSystemAnimationsAreEnabled(Boolean areEnabled) {
systemAnimationsEnabled = areEnabled;
}

Expand Down

0 comments on commit 47745aa

Please sign in to comment.