qq_34375473
卧龙小蛋
采纳率0%
2017-02-19 07:12

为什么视频缩略图在listView列表中不显示

String urlvideo=cursor.getString(cursor.getColumnIndex("Video"));
contenttv.setText(content);
timeiv.setText(time);
imgiv.setImageBitmap(getImageThumbnail(url, 200, 200));
videoiv.setImageBitmap(getVideoThumbnail(urlvideo, 200, 200,
MediaStore.Images.Thumbnails.MICRO_KIND));

            private Bitmap getVideoThumbnail(String uri, int width, int height, int kind) {
Bitmap bitmap = null;
bitmap = ThumbnailUtils.createVideoThumbnail(uri, kind);
bitmap = ThumbnailUtils.extractThumbnail(bitmap, width, height,
        ThumbnailUtils.OPTIONS_RECYCLE_INPUT);

return bitmap;
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

相关推荐