ioneday / ImageSelector

Photo picker library for Android. Support single choice、multi-choice、cropping image and preview image.
408 stars 126 forks source link

重名文件夹图片无法加载, 图片排序建议改为降序 #12

Open chenxiaojin opened 8 years ago

chenxiaojin commented 8 years ago

当SD有重名的目录时, 只能加载其中一个目录文件。原因是因为多加了一个判断, 注释了就可以了. 之前已经通过hashset判断重复文件,这里应该可以不用了

private LocalMediaFolder getImageFolder(String path, List imageFolders) {
File imageFile = new File(path);
File folderFile = imageFile.getParentFile();

// for (LocalMediaFolder folder : imageFolders) {
// if (folder.getName().equals(folderFile.getName())) {
// return folder;
// }
// }
LocalMediaFolder newFolder = new LocalMediaFolder();
newFolder.setName(folderFile.getName());
newFolder.setPath(folderFile.getAbsolutePath());
newFolder.setFirstImagePath(path);
return newFolder;
}

目前图片排序为升序, 建议改为降序

mstbetter commented 7 years ago

请问怎么改成降序

chenxiaojin commented 7 years ago

@mstbetter 我忘记改了哪里了, LocalMediaLoader你参考一下 LocalMediaLoader .txt

mstbetter commented 7 years ago

@chenxiaojin 谢谢了 ,我看看

Voidruiyi commented 7 years ago

请问怎么改成降序