use of org.thoughtcrime.securesms.components.ThumbnailView in project Signal-Android by WhisperSystems.
the class MediaAdapter method onBindItemViewHolder.
@Override
public void onBindItemViewHolder(final ViewHolder viewHolder, @NonNull final Cursor cursor) {
final ThumbnailView imageView = viewHolder.imageView;
final MediaRecord mediaRecord = MediaRecord.from(cursor);
Slide slide = MediaUtil.getSlideForAttachment(getContext(), mediaRecord.getAttachment());
if (slide != null) {
imageView.setImageResource(masterSecret, slide, false);
}
imageView.setOnClickListener(new OnMediaClickListener(mediaRecord));
}
Aggregations