allprojects { repositories { ... maven { url 'https://jitpack.io' } } } dependencies { implementation "com.github.CarGuo:FrescoUtils:c39608c9b2" } update fresco to 1.8.0
update fresco to 1.7.1
update subsampling-scale-image-view to 3.9.0
update photodraweeview to 1.1.3
update gradle to 4.0.1
update fresco to 1.5.0
/** * @param imageView 图片加载控件 * @param loadOption 加载配置构造器 */ public static void loadFrescoImage(FrescoImageView imageView, LoadOption loadOption) -
1.0.6 update fresco to 1.3.0;
-
1.0.5 update fresco to 1.2.0;移除无用依赖;
-
1.0.4 update fresco to 1.0.1,update scaleImage to 3.6.0
-
1.0.3 update fresco to 1.0.0
-
1.0.2 最低API调整到15
-
1.0.1 增加了额FrescoHelper直接超大图加载接口
/** * 超大图片的就接口 * * @param context 上下玩 * @param imageView 图片加载控件 * @param imageUri 图片地址 * @param defaultId 默认失败图片 */ public static void loadBigImage(final Context context, final SubsamplingScaleImageView imageView, String imageUri, final int defaultId) ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this) .setDownsampleEnabled(true) .build(); Fresco.initialize(this, config); FrescoHelper 封装了针对 FrescoImageView 的工具类,直接使用FrescoImageView作为ImageView使用即可。
封装了多种类型,这是最全的一种
/** * @param imageView 图片加载控件 * @param uri 路径或者URL * @param defaultImg 默认图片 * @param cornerRadius 弧形角度 * @param isCircle 是否为圆 * @param loadLocalPath 是否本地资源,如果显示R.drawable.xxx,Path可以为null,前提isCircle为true * @param isAnima 是否显示GIF动画 * @param size 是否再编码 * @param postprocessor 图像显示处理 */ public static void loadFrescoImage(FrescoImageView imageView, String uri, int defaultImg, int cornerRadius, boolean isCircle, boolean loadLocalPath, boolean isAnima, Point size, Postprocessor postprocessor) { init(imageView, cornerRadius, isCircle, isAnima, size, postprocessor); if (loadLocalPath) { imageView.loadLocalImage(uri, defaultImg); } else { imageView.loadView(uri, defaultImg); } } ··· FrescoHelper.loadFrescoImage(frescoImageView, recyclerDataModel.getUrl(), R.mipmap.ic_launcher, 2, false, recyclerDataModel.getSize(), new BlurPostprocessor(context, 10)); 




