Last active
March 31, 2017 15:12
-
-
Save tcw165/b58eada5969d6c0e3839a114a363439c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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