Closed hannojg closed 2 years ago
I have the same problem
Hi @mojtabasheikhy and @hannojg,
Auto repeat is based on AXrLottieImageView
's autoRepeat property.
AXrLottieDrawable
's autoRepeat only matters if you are not using AXrLottieImageView
.
Or you can change the auto repeat on AXrLottieDrawable
after calling AXrLottieImageView#setLottieDrawable
.
This code should work:
lottieView.setAutoRepeat(false);
lottieView.setLottieDrawable(
AXrLottieDrawable.fromJson(jsonString, cacheKey)
.setSize(decodeWidth, decodeHeight)
.build()
);
lottieView.playAnimation();
let me know if it didn't. Thanks!
Fixed on v1.4.0
Hi @mojtabasheikhy and @hannojg, Auto repeat is based on
AXrLottieImageView
's autoRepeat property.AXrLottieDrawable
's autoRepeat only matters if you are not usingAXrLottieImageView
. Or you can change the auto repeat onAXrLottieDrawable
after callingAXrLottieImageView#setLottieDrawable
.This code should work:
lottieView.setAutoRepeat(false); lottieView.setLottieDrawable( AXrLottieDrawable.fromJson(jsonString, cacheKey) .setSize(decodeWidth, decodeHeight) .build() ); lottieView.playAnimation();
let me know if it didn't. Thanks!
Thanks, it's fixed 🙌
Example reproduction code:
Observation vs. Expectation
I expect the animation to only play once, and then stop. However, the animation keeps repeating.