删除照片缩略图画廊后手动删除该照片文件 [英] Delete photo thumbnail in Gallery after manually delete the photo file
本文介绍了删除照片缩略图画廊后手动删除该照片文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
case R.id.menu_delete:
File photoToDelete = new File(photoPath, photoList[gPosition]);
photoToDelete.delete();
checkPhotoFolder();
galleryAdapter.notifyDataSetChanged();
Log.d("position", "" + gPosition);
return true;
我是手动使用上述code删除照片文件。但是在系统图库照片仍然显示为空白缩略图。
现在的问题是我怎么能删除的照片文件,也缩略图在画廊?
I'm manually delete a photo file using above code. But in the system gallery the photo still show the blank thumbnail. The question is how can I delete the photo file and also the thumbnail of it in the gallery?
推荐答案
试试这个。
getContentResolver().delete(Uri.fromFile(photoToDelete), null, null);
这篇关于删除照片缩略图画廊后手动删除该照片文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文