I have implemented a RecyclerView that contains mainly images which is loading in through Picasso. My problem is that as soon as I scroll down or up the view, the placeholde
Use Glide. it caches the resized image, not the full-size image, unlike Picasso. In this approach, you will lose image quality. If you want to retain the full-size quality, I suggest you use Glide to load and save the image into file storage, so whenever you need the full-size image, just access that image from file storage.
just use noPlaceholder
attribute.
I can't verify the correctness of this solution, but I was facing this problem as well and approached it following this idea:
@Override
public void onBindViewHolder(ViewHolder viewHolder, final int i) {
...
if(mImageView.getDrawable() == null)
Picasso.with(context)
.load(path)
.error(errorResId)
.tag(tag)
.into(mImageView);
...
}
It is intended to forbid Picasso from loading anything unless the ImageView has nothing to display.