Animation stopped without onAnimationStop getting called
See original GitHub issueDescription
I want to hide simpleDraweeView after gif animation completion. So I have added AnimationListener and hide my controller onAnimationStop. But half of the time it does not call the onAnimationStop method. Let me know if I am doing something wrong.
new BaseControllerListener() {
@Override
public void onFinalImageSet(
String id,
@Nullable Object imageInfo,
@Nullable final Animatable animatable) {
if (animatable != null) {
AnimatedDrawable2 animatedDrawable = (AnimatedDrawable2) animatable;
animatedDrawable.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(AnimatedDrawable2 drawable) {
Log.i(TAG, "onAnimationStart: ");
}
@Override
public void onAnimationStop(AnimatedDrawable2 drawable) {
.setVisibility(View.GONE);
Log.i(TAG, "onAnimationStop: ");
}
@Override
public void onAnimationReset(AnimatedDrawable2 drawable) {
Log.i(TAG, "onAnimationReset: ");
}
@Override
public void onAnimationRepeat(AnimatedDrawable2 drawable) {
Log.i(TAG, "onAnimationRepeat: ");
}
@Override
public void onAnimationFrame(AnimatedDrawable2 drawable, int frameNumber) {
Log.i(TAG, "onAnimationFrame: "+frameNumber);
}
});
Log.i(TAG, "animatable.start();: ");
animatable.start();
}
}
})
Additional Information
- Fresco version:1.8.1
- Platform version: Android 7.1.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
onAnimationEnd is not getting called, onAnimationStart works ...
I'm animating ScrollView contents using TranslateAnimation. When animation starts, the onAnimationStart listener is called but the ...
Read more >AnimationTrack.Looped Does Not Replicate - Engine Features
Stopped:Connect(OnAnimationStop) table.insert(UsedAnimations, ... Calling AnimationTrack:Stop() doesn't stop the animation on the client.
Read more >react-sequence-animator - npm
This is a supper simple React library that lets us create animations in an easy ... a callback function that is called when...
Read more >CssTransition.js Source Code | ExtAngular ... - modern
runningNameMap, toPropertyNames, i, ln, name;. animation.un('stop', 'onAnimationStop', this);. if (runningData) {. runningNameMap = runningData.nameMap;. }.
Read more >Scripting API: Animation.Stop - Unity - Manual
Stops an animation named name . Stopping an animation also Rewinds it to the Start. using UnityEngine; public class ExampleScript : MonoBehaviour ...
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
@PalDhv and @test01wrk, thank you for this, but I’m still not able to reproduce it on my side. If you could provide a sample project with this bug, that would be awesome and I would take a look at it.
Can’t reproduce right now. @PalDhv, can you please share your gif? @test01wrk can you please share your code and gif?