You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When animateLottieCompositionAsState is used with a clipSpec that has min progress greater than 0, the animation is played from beginning anyway. For example:
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.heart))
val state = animateLottieCompositionAsState(
composition = composition,
iterations = 1,
clipSpec = LottieClipSpec.Frame(min = 33, max = 42),
)
Log.w("LOTTIE", "progress = ${state.progress}, isAtEnd = ${state.isAtEnd}")
LottieAnimation(
composition = composition,
progress = state.progress,
)
Steps To Reproduce
Steps to reproduce the behavior:
Run issue-repro-compose
Observe animation and logs
Expected:
Animation skips the first part with a grey heart, log shows:
Link to fork with a repro in the issue-repro module
https://github.com/headsvk/lottie-android/tree/bug/min-progress
Describe the bug
When
animateLottieCompositionAsState
is used with aclipSpec
that has min progress greater than 0, the animation is played from beginning anyway. For example:Steps To Reproduce
Steps to reproduce the behavior:
Expected:
Animation skips the first part with a grey heart, log shows:
Actual:
Animation plays from the beginning, log shows:
The text was updated successfully, but these errors were encountered: