Skip to content

Commit

Permalink
LS Clock: Use unique cache key for each lottie animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmud0808 committed May 1, 2024
1 parent 4cb36d5 commit cf4e6e5
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -326,7 +326,7 @@ object ViewHelper {
if (isXposedMode) {
lottieAnimView.let {
callMethod(it, "setLayoutParams", animationParams)
callMethod(it, "setAnimation", rawRes, "cacheKey")
callMethod(it, "setAnimation", rawRes, "cacheKey_$styleIndex");
callMethod(it, "setRepeatCount", LottieDrawable.INFINITE)
callMethod(it, "setScaleType", ImageView.ScaleType.FIT_CENTER)
callMethod(it, "setAdjustViewBounds", true)
Expand All @@ -336,7 +336,7 @@ object ViewHelper {
} else {
(lottieAnimView as LottieAnimationView).apply {
layoutParams = animationParams
setAnimation(rawRes, "cacheKey")
setAnimation(rawRes, "cacheKey_$styleIndex")
repeatCount = LottieDrawable.INFINITE
renderMode = RenderMode.HARDWARE
scaleType = ImageView.ScaleType.FIT_CENTER
Expand Down

0 comments on commit cf4e6e5

Please sign in to comment.