-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Change DecodeFormat on a per request basis ? #405
Comments
You can use |
Hum, ok did not find this one :( This removes the crossFade from builder so I suppose that I have to use the animate functions but then how to I access the previous image to do the cross fade ? This also show another thing from the doc animate is not applied when image is loaded from memory, but crossfade documentation does not talk about this same limitation. Is crossfade always applied or documentation just miss this information ? |
CrossFade uses Android's TransitionDrawable which expects Drawables, not Bitmaps. As a result, crossFade doesn't work out of the box with asBitmap(). I believe asBitmap() defaults to fading the view in instead. If you need to both set the format on a per request basis and use cross fade, you can do one of two things:
If it were me, I'd be inclined toward 2, but either one should work. |
Well since it's only a very small subset of my app, I suppose I'll go with simple animation and no place holder as data should be available quickly. Before closing this one can you confirm that either the crossfade apply even when loaded from memory or that the placeholder will not be displayed before if loaded from memory ? |
Neither animations nor placeholders are applied when loading resources from the memory cache. |
Ok thanks. |
Forget to post that earlier, but it seems that there's no way to change DecodeFormat on a per request basis.
Only at glide level.
Is there a way via a specific model loader or something to have different configuration for this ?
I do no need transparency for 95% of the requests and default configuration is perfect but for the 5 last percent (known cases) I need it and activating it for everything is a huge waste of resources :(
The text was updated successfully, but these errors were encountered: