I am using android.support.v7.widget.RecyclerView to show simple items containing text and in some cases also images. Basically I followed the tutorial from here https://dev
I think you need to add an else
clause to your if ( object.has("image") )
statement in the onBindViewHolder(ViewHolder holder, int position)
method, setting the image to null:
holder.image.setImageDrawable(null);
I think the documentation for onBindViewHolder describe it best why this is necessary:
Called by RecyclerView to display the data at the specified position. This method should update the contents of the itemView to reflect the item at the given position.
You should always assume that the ViewHolder passed in needed to be completely updated :)