|
@@ -45,9 +45,7 @@ public class ImageLoaderUtils {
|
|
|
if (requestOptions == null) {
|
|
|
loadNetworkPic(imageView.getContext(), imageUrl, imageView);
|
|
|
} else {
|
|
|
- Glide.with(imageView.getContext()).asBitmap().load(imageUrl).dontAnimate().apply(requestOptions)
|
|
|
- .apply(new RequestOptions().skipMemoryCache(true)) // 跳过内存缓存
|
|
|
- .into(imageView);
|
|
|
+ Glide.with(imageView.getContext()).asBitmap().load(imageUrl).dontAnimate().apply(requestOptions).into(imageView);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -58,9 +56,7 @@ public class ImageLoaderUtils {
|
|
|
if(context instanceof Activity && ((Activity) context).isFinishing()) {
|
|
|
return;
|
|
|
}
|
|
|
- Glide.with(context).asBitmap().load(pic).dontAnimate().centerCrop()
|
|
|
- .apply(new RequestOptions().skipMemoryCache(true)) // 跳过内存缓存
|
|
|
- .into(iv);
|
|
|
+ Glide.with(context).asBitmap().load(pic).dontAnimate().centerCrop().into(iv);
|
|
|
}
|
|
|
|
|
|
public static void loadRes(@DrawableRes int res, ImageView imageView ){
|
|
@@ -70,9 +66,7 @@ public class ImageLoaderUtils {
|
|
|
if(imageView.getContext() instanceof Activity && ((Activity) imageView.getContext()).isFinishing()){
|
|
|
return;
|
|
|
}
|
|
|
- Glide.with(imageView.getContext()).asBitmap().load(res).dontAnimate().centerCrop()
|
|
|
- .apply(new RequestOptions().skipMemoryCache(true)) // 跳过内存缓存
|
|
|
- .placeholder(res).into(imageView);
|
|
|
+ Glide.with(imageView.getContext()).asBitmap().load(res).dontAnimate().centerCrop().placeholder(res).into(imageView);
|
|
|
}
|
|
|
|
|
|
|