Skip to content
This repository was archived by the owner on Jun 19, 2021. It is now read-only.

Conversation

lolobosse
Copy link

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?

@riggaroo riggaroo merged commit e17f5d4 into riggaroo:master May 25, 2016
@riggaroo
Copy link
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);
Copy link

@TWiStErRob TWiStErRob May 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link

@TWiStErRob TWiStErRob May 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

3 participants