Efficient conditional transition running
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
So Google is deprecating isUserVisibleHint for fragments.
This reopen the requirement to have a conditional way to easily prevent transitions from running that would be checked just before running.
Currently there's no proper way to handle this via the provided callbacks, one way is to set a listener then handle the check in ```onResourceReady```.
The problem of this approach is that there's no way from that callback to just remove the animation, so we need to identify the type and manually apply the resource by duplicating existing code for each kind of resource / target.
The other way would be to use a custom TransitionFactory, to create transition wrappers but this does not covers any of the Glide default transitions .
Since RequestListener, Request and Target are pure Interface and Java does not allow default implementation for those I don't think they can be expanded without breaking backward compatibility,
cc: @sjudd
Contributor guide
Assessment
This issue has not been assessed yet.