Open xiangtongcheng opened 5 years ago
if (data.getCount() > 0) { //构造所有图片的集合 ImageFolder allImagesFolder = new ImageFolder(); allImagesFolder.name = activity.getResources().getString(R.string.ip_all_images); allImagesFolder.path = "/"; allImagesFolder.cover = allImages.get(0); allImagesFolder.images = allImages; imageFolders.add(0, allImagesFolder); //确保第一条是所有图片 }
如代码所示应该判断allImages集合是否为null
新分支: https://github.com/CysionLiu/ImagePicker
在原项目基础上修复bug和增加功能,尽量做到对原开发者的使用无侵入
if (data.getCount() > 0) { //构造所有图片的集合 ImageFolder allImagesFolder = new ImageFolder(); allImagesFolder.name = activity.getResources().getString(R.string.ip_all_images); allImagesFolder.path = "/"; allImagesFolder.cover = allImages.get(0); allImagesFolder.images = allImages; imageFolders.add(0, allImagesFolder); //确保第一条是所有图片 }
如代码所示应该判断allImages集合是否为null