Skip to content

Remove animation on GifTextureView #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
archie94 opened this issue Aug 13, 2020 · 2 comments
Closed

Remove animation on GifTextureView #745

archie94 opened this issue Aug 13, 2020 · 2 comments

Comments

@archie94
Copy link

The documentation says

Sets the source of the animation. Pass {@code null} to remove current source.
Equivalent of {@code setInputSource(inputSource, null)}.

However the Texture view seems to persist the last frame of the animation. Is this the intended behavior?

On a GifImageView doing

gifImageView.setImageDrawable(null)

removes the animation completely. It would be nice if we can have consistent behavior across the two Gif views.
Excited to know your thoughts on the same.

Reproducible commit

Thanks!

@koral--
Copy link
Owner

koral-- commented Aug 13, 2020

Good catch.
AFAIR at the time of writing neither behavior was explicitly intended. The purpose of removing the input source was to free the related resources.
I think that it is a good idea to clear the texture.
Wanna make a PR?

@archie94
Copy link
Author

Yes. Will send out a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants