使用此代码重命名图像后:
String path = "/storage/emulated/0/Download/";
File from = new File (path, "old.jpg");
File to = new File (path, "new.jpg");
from.renameTo (to);
String newpath = to.getAbsolutePath();
如果我尝试打开图库并选择相同的图像(已更改其名称),则该图像不会显示在imageView中。为什么?
其他信息:如果我尝试从画廊中选择图像的URI
进行打印时,它会出现在控制台中:
D/picUri: content://com.google.android.apps.photos.contentprovider/blablabla/ORIGINAL/NONE/2094062349