Add resetter for minFrame/maxFrame properties
See original GitHub issueIs your feature request related to a problem? Please describe. Programatically I first want something to loop, so I set a min and max frame, but after a specific action, I want to play the remaining end of the animation and stop looping.
Describe the solution you’d like
Either add a resetMinFrame()/resetMaxFrame()
or if the lib would be in kotlin make the setMinFrame()/setMaxFrame()
methods have an optional argument, that when not specified, resets the min/max values.
Describe alternatives you’ve considered Create a kotlin extension with this code:
fun LottieAnimationView.resetMaxFrame() {
val frames = this.composition?.durationFrames?.toInt() ?: 0
this.setMaxFrame(frames)
}
Additional context None
Lottie is supported and developed on nights and weekends. Please consider sponsoring Lottie to prioritize this issue and help support this issue as well as future investments.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
Let me know if that isn’t sufficient for you.
@gpeal Just saw this issue still being referenced in our code, can you please look at the above comment? Still applies. 😃 Thanks!