Skip to content

Instantly share code, notes, and snippets.

@tcw165
Last active March 31, 2017 15:12
Show Gist options
  • Save tcw165/b58eada5969d6c0e3839a114a363439c to your computer and use it in GitHub Desktop.
Save tcw165/b58eada5969d6c0e3839a114a363439c to your computer and use it in GitHub Desktop.
@Override
public void onBindViewHolder(final RecyclerView.ViewHolder viewHolder,
final int position,
List<Object> payloads) {
final ImageView imageView = (ImageView) viewHolder.itemView;
final IPhoto photo = getPhotoAt(position);
Glide.with(getContext())
.load(photo.thumbnailPath())
// Setting the placeholder will fix the "ghost images" problem.
// .placeholder(ContextCompat.getDrawable(
// getContext(), R.drawable.bg_borderless_rect_light_gray))
.priority(Priority.IMMEDIATE)
.into(imageView);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment