Open wangtb opened 3 years ago
Glide Version:4.11.0
Integration libraries:okhttp3-integration:4.11.0
Device/Android Version:Android 9.0, Sumsang S8
Issue details / Repro steps / Use case background:
Load new image from network(same model, different signature), using cached image as placeholder
Glide load line / GlideModule (if any) / list Adapter code (if any):
GlideModule
GlideApp.with(mContext) .load(model) .signature(oldSignature) .onlyRetrieveFromCache(true) .listener(new RequestListener<Drawable>() { @Override public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) { GlideApp.with(mContext) .load(model) .placeholder(R.mipmap.default) .error(R.mipmap.error) .signature(oldSignature) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(imageView); return false; } @Override public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) { GlideApp.with(mContext) .load(model) .placeholder(resource) .error(resource) .signature(newSignature) .dontAnimate() .diskCacheStrategy(DiskCacheStrategy.ALL) .into(imageView); return false; } }) .preload();
But onLoadFailed was called all the time.
Layout XML:
<FrameLayout xmlns:android="...
Stack trace / LogCat:
W/Glide: Load failed for Model@57fa5b0 with size [-2147483648x-2147483648] class com.bumptech.glide.load.engine.GlideException: Failed to load resource
http://bumptech.github.io/glide/doc/debugging.html#unexpected-cache-misses
Glide Version:4.11.0
Integration libraries:okhttp3-integration:4.11.0
Device/Android Version:Android 9.0, Sumsang S8
Issue details / Repro steps / Use case background:
Load new image from network(same model, different signature), using cached image as placeholder
Glide load line /
GlideModule
(if any) / list Adapter code (if any):But onLoadFailed was called all the time.
Layout XML:
Stack trace / LogCat: