Skip to content
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

Visually indicate where the transcoded resource was coming from #108

Open
TWiStErRob opened this issue Sep 1, 2014 · 2 comments
Open

Visually indicate where the transcoded resource was coming from #108

TWiStErRob opened this issue Sep 1, 2014 · 2 comments

Comments

@TWiStErRob
Copy link
Collaborator

There should be an optionally available way of displaying an indicator on the target which tells you any feasible combination of these:

  • it was downloaded from the network
  • it was loaded from disk cache
  • it was loaded from memory cache
  • it was just put into disk cache
  • it was just put into memory cache
  • it's a thumbnail
  • it's a placeholder
@technoir42
Copy link
Contributor

Here is my idea how to implement this https://gist.github.com/technoir42/7b1ed8029178f7c92963d46547997e84. The downside is that enabling indicator disables the default transitions.

@TWiStErRob
Copy link
Collaborator Author

Wow, that's pretty neat! With a bit of refactoring you can get it to wrap the default behavior (have it receive an instance of another factory and delegate).

If you're not afraid of hacking around you may even make it wrap the "current" factory regardless of what it is: put the extension on DrawableTransitionOptions and use (not recommended, but possible ;) https://github.com/bumptech/glide/blob/master/library/src/main/java/com/bumptech/glide/TransitionOptions.java#L91; with a static boolean to toggle factories in build you may even turn it on/off globally.

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

3 participants