I have been working on this for a while, and it is time to ask him a SO question.
Finding and loading a cached image in Glide looks like this, but after the links and discussion on the Glide page it does not work for me.
In step A, I upload the image via the URL in ImageView .
After that, I go offline using the device. Then I open Activity B, where I load the same URL into another ImageView that has different dimensions. It only works if the width and height are the ImageView for Activity A, or you provide override() width and height of this first ImageView . But activity B is not aware of this.
I do this in action A:
Glide.with(context) .load(url) .diskCacheStrategy(DiskCacheStrategy.ALL) .placeholder(R.drawable.placeholder) .crossFade() .into(image);
and in action B:
Glide.with(mContext) .load(url) .override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL) .into(imageView);
I tried this because I thought that the original would be saved in the disk strategy, so it would load this file. The result is that the image does not load.
I am thinking of returning to Picasso because I think it is possible there, but I give Stackoverflow another try.
I would immediately choose generosity, if that was possible ...
android android-glide
Boy
source share