diff --git a/PicassoImageLoader/src/main/java/com/vansz/picassoimageloader/PicassoImageLoader.java b/PicassoImageLoader/src/main/java/com/vansz/picassoimageloader/PicassoImageLoader.java index 0d02895..db52168 100644 --- a/PicassoImageLoader/src/main/java/com/vansz/picassoimageloader/PicassoImageLoader.java +++ b/PicassoImageLoader/src/main/java/com/vansz/picassoimageloader/PicassoImageLoader.java @@ -27,6 +27,8 @@ /** * Created by Vans Z on 2020-02-28. + * error: Picasso.into(new Target()) 平均5次调用会出现一次不会调用 + * onBitmapLoaded 或者 onBitmapFailed 回调方法的bug, 官方一直未修复 * 暂不支持百分比进度指示器 */ public class PicassoImageLoader implements ImageLoader { diff --git a/app/src/main/java/com/hitomi/transferimage/activity/ComplexDemoActivity.java b/app/src/main/java/com/hitomi/transferimage/activity/ComplexDemoActivity.java index 1a753d7..b04625d 100644 --- a/app/src/main/java/com/hitomi/transferimage/activity/ComplexDemoActivity.java +++ b/app/src/main/java/com/hitomi/transferimage/activity/ComplexDemoActivity.java @@ -18,9 +18,7 @@ import com.hitomi.transferimage.SourceConfig; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; -import com.squareup.picasso.Picasso; import com.vansz.glideimageloader.GlideImageLoader; -import com.vansz.picassoimageloader.PicassoImageLoader; import com.vansz.universalimageloader.UniversalImageLoader; import com.zhy.adapter.recyclerview.CommonAdapter; import com.zhy.adapter.recyclerview.MultiItemTypeAdapter; @@ -95,7 +93,7 @@ private void recyclerDemo() { .setSourceUrlList(SourceConfig.getOriginalSourceGroup()) .setProgressIndicator(new ProgressBarIndicator()) .setIndexIndicator(new NumberIndexIndicator()) - .setImageLoader(PicassoImageLoader.with(getApplicationContext())) + .setImageLoader(GlideImageLoader.with(getApplicationContext())) .enableHideThumb(false) .bindRecyclerView(recyclerView, R.id.iv_thum); RecyclerAdapter recyclerAdapter = new RecyclerAdapter(); @@ -123,7 +121,7 @@ private class RecyclerAdapter extends CommonAdapter { @Override protected void convert(ViewHolder viewHolder, String item, final int position) { final ImageView imageView = viewHolder.getView(R.id.iv_thum); - Picasso.get() + Glide.with(imageView) .load(item) .placeholder(R.mipmap.ic_empty_photo) .into(imageView); diff --git a/app/src/main/res/layout/activity_complex_demo.xml b/app/src/main/res/layout/activity_complex_demo.xml index 6bdf47c..cef06eb 100644 --- a/app/src/main/res/layout/activity_complex_demo.xml +++ b/app/src/main/res/layout/activity_complex_demo.xml @@ -16,7 +16,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="12dp" - android:text="使用了 RecyclerView 作为载体,Picasso 加载图片,RecyclerView 全部展开,演示了最普遍、简单、常用的使用方式:" + android:text="使用了 RecyclerView 作为载体,Glide 加载图片,RecyclerView 全部展开,演示了最普遍、简单、常用的使用方式:" android:textColor="#888" />