I just posted a sample project that uses SmartImageView to display video thumbnails obtained from MediaStore. The SmartImage implementation is fairly straightforward:
private static class VideoThumbnailImage implements SmartImage {
private int videoId;
private int thumbnailKind;
VideoThumbnailImage(int videoId, int thumbnailKind) {
this.videoId=videoId;
this.thumbnailKind=thumbnailKind;
}
@Override
public Bitmap getBitmap(Context ctxt) {
return(MediaStore.Video.Thumbnails.getThumbnail(ctxt.getContentResolver(),
videoId,
thumbnailKind,
null));
}
}
My code is licensed Apache License 2.0, and I have no qualms if you want to add this code to your project.
I just posted a sample project that uses
SmartImageView
to display video thumbnails obtained fromMediaStore
. TheSmartImage
implementation is fairly straightforward:My code is licensed Apache License 2.0, and I have no qualms if you want to add this code to your project.