Skip to content

Commit

Permalink
[M]demo 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitomis committed May 28, 2020
1 parent ad09163 commit 48ebe19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -123,7 +121,7 @@ private class RecyclerAdapter extends CommonAdapter<String> {
@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);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_complex_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

<androidx.recyclerview.widget.RecyclerView
Expand Down

0 comments on commit 48ebe19

Please sign in to comment.