This repository was archived by the owner on Jun 19, 2021. It is now read-only.
Added a beta gif support#11
Merged
riggaroo merged 3 commits intoriggaroo:masterfrom May 25, 2016
Merged
Conversation
Owner
|
Available in version 1.3.0 |
| Glide.with(this).load(tutorialItem.getForegroundImageRes()).into(imageViewFront); | ||
| } | ||
| if (tutorialItem.getForegroundImageRes() != -1 && tutorialItem.isGif()){ | ||
| Glide.with(this).load(tutorialItem.getForegroundImageRes()).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(imageViewFront); |
There was a problem hiding this comment.
@lolobosse @spongebobrf You don't need this distinction because you're loading from resources. This will just copy the already big GIF files to the cache which won't be faster because the APK and the cache are both on device / sd card. This just wastes space for users. Also asGif() is not needed because Glide knows if it's still or not.
There was a problem hiding this comment.
I think the best would be to use NONE for all loads, after all this should be only seen once by each user, and if the user goes back to a previous page of the tutorial it should still be in memory cache. After it is dismissed the files will just stay in disk cache otherwise, likely not ever loaded again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For my company I wanted to have animated pictures in the tutorial and therefore, because you're using Glide, it is pretty easy!
I just modified a bit the model class (and it has to be more modified if we really want to integrate this feature because some constructors are still missing).
What do you think, do you want to have that feature out of the box?