开发者

Android video recording & Thumbnail

开发者 https://www.devze.com 2023-01-31 01:32 出处:网络
In my application, I record some video. After recording the video I need to show the video thumbnai开发者_JAVA技巧l; I get the thumbnail but it is only an image -- it does not contain the play image o

In my application, I record some video. After recording the video I need to show the video thumbnai开发者_JAVA技巧l; I get the thumbnail but it is only an image -- it does not contain the play image on the thumbnail.

How can I add the play icon to the image?

BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 1;
Bitmap curThumb =
    MediaStore.Video.Thumbnails.getThumbnail(cr, id,
    MediaStore.Video.Thumbnails.MICRO_KIND, options);
image.setImageBitmap(curThumb);


Add a play icon to your android project, merge this icon image with the thumbnail bitmap you are getting from the video and show it.

Hope this help!

0

精彩评论

暂无评论...
验证码 换一张
取 消