Provide callback when animated GIF is done playing
See original GitHub issueProvide a mechanism for the caller to be notified when an animated GIF has completed all loops. ( Similar to Glide V4’s onAnimationEnd listener - see https://github.com/bumptech/glide/pull/3438 )
For example,
binding.myImageView.load(R.drawable.some_gif_animation) {
repeatCount(0)
onAnimationComplete = { /* do something */ }
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
javascript trigger when gif animation is done - Stack Overflow
I would like a javascript script that detects when the gif is done animating, and then redirects to another site. Is this possible?...
Read more >React Native's Animated.loop: Invoking A Callback Whenever ...
loop function is great to continuously run animations, but it lacks one feature: invoking a callback whenever an iteration is finished. pexels.
Read more >withAnimation completion callback with animatable modifiers
A custom AnimatableModifier implementation allows us to get a callback once an animation of a specific property completes. This is in most cases ......
Read more >Animation: finish event - Web APIs | MDN
The finish event of the Animation interface is fired when the animation finishes playing, either when the animation completes naturally, ...
Read more >AnimatedImageDrawable - Android Developers
Pass this to setRepeatCount(int) to repeat infinitely. ... A repeat count of 0 means that the animation will play once, regardless of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍 Makes sense. In the meantime as a work-around,
MovieDrawable
andAnimatedImageDrawable
both implementAnimatable2
/Animatable2Compat
which allows you to set a listener for start/end events.@sagar-viradiya - using
binding.fullScreenImage.setImageDrawable(result)
still just shows the first frame of the animation. I’m looking forward to getting the update once your PR is integrated. Thanks for writing it!