|
|
|
|
@ -21,6 +21,7 @@ import com.bumptech.glide.load.resource.gif.GifDrawable; |
|
|
|
|
import com.bumptech.glide.request.RequestListener; |
|
|
|
|
import com.bumptech.glide.request.target.Target; |
|
|
|
|
import com.bumptech.glide.request.transition.Transition; |
|
|
|
|
import com.bumptech.glide.signature.ObjectKey; |
|
|
|
|
import com.fongmi.android.tv.App; |
|
|
|
|
import com.fongmi.android.tv.impl.CustomTarget; |
|
|
|
|
import com.github.catvod.utils.Json; |
|
|
|
|
@ -52,7 +53,7 @@ public class ImgUtil { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void load(File file, ImageView view) { |
|
|
|
|
Glide.with(view).load(file).skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.NONE).into(new CustomTarget<Drawable>() { |
|
|
|
|
Glide.with(view).load(file).diskCacheStrategy(DiskCacheStrategy.NONE).signature(new ObjectKey(file.lastModified())).into(new CustomTarget<Drawable>() { |
|
|
|
|
@Override |
|
|
|
|
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) { |
|
|
|
|
if (resource instanceof GifDrawable) ((GifDrawable) resource).start(); |
|
|
|
|
|