Recyclerview Adapter and Glide – same image every 4-5 rows

The answers here are incorrect, although they’re on the right track.

You need to call Glide#clear(), not just set the image drawable to null. If you don’t call clear(), an async load completing out of order may still cause view recycling issues. Your code should look like this:

public void onBindViewHolder(ViewHolder holder, int position) {
    if (parseList.get(position).get("logo") != null) {
        ParseFile image = (ParseFile) parseList.get(position).get("logo");
        String url = image.getUrl();
                .transform(new CircleTransform(context)) 
    } else {
        // make sure Glide doesn't load anything into this view until told otherwise
        // remove the placeholder (optional); read comments below

Leave a Comment