Android的 - 在生成缩略图画廊 [英] Android - Generate Thumbnails in Gallery

查看:344
本文介绍了Android的 - 在生成缩略图画廊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在建立一个相机应用并存储。不过,我每次拍照时,图像保存在目录中,但不保存在图库中。我想这是所有关于代缩略图的图像已被拍摄后的权利。你怎么能产生在画廊的缩略图?

I am currently creating a camera app and storing it. However, every time I take a picture, the picture is saved in the directory but is not saved in the Gallery. I think it's all about the generation of thumbnail right after the image has been taken. How can you generate a thumbnail in the gallery?

推荐答案

试试这个:

Intent mediaScan = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
mediaScan.setData(uri);
context.sendBroadcast(mediaScan);

这篇关于Android的 - 在生成缩略图画廊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆