Tag: recyclinglerview

Recyclerview痛苦地缓慢加载从毕加索caching的图像

我已经实现了一个RecyclerView,主要包含通过Picasso加载的图像。 我的问题是,只要我向下滚动或向上的视图,占位符图像出现约。 一秒钟之后,它被实际的图像取代。 它滚动非常顺利,但实际上是无法使用的。 每当某个东西从屏幕上滚动时,就会发生这种情况。 毕加索显然将图像caching到磁盘上,因为它们的加载速度比初始加载时间要快,但是它们肯定会立即从caching中重新加载。 我错误地执行了什么? 我的适配器代码: public class ExploreAdapter extends RecyclerView.Adapter<ExploreAdapter.ExploreViewHolder> { private List<ExploreItem> exploreItemList; private Context mContext; private int deviceWidth = PrefUtils.getDeviceWidth(); public ExploreAdapter(Context context, List<ExploreItem> exploreItemList){ this.mContext = context; this.exploreItemList = exploreItemList; } @Override public int getItemCount(){ return exploreItemList.size(); } @Override public void onBindViewHolder(ExploreViewHolder exploreViewHolder, int i){ ExploreItem item = exploreItemList.get(i); […]