We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
感谢donglua大佬做出来的框架,今天添加功能的时候遇到了这个问题,看了一下源码,发现在PhotoPickerFragment中,openCamera()对应的onActivityResult()加上一下代码,可以实现该功能:
if (directories.size() > 0) { String path = captureManager.getCurrentPhotoPath(); Log.i("获取的图片路径", "onActivityResult: "+path); PhotoDirectory directory = directories.get(INDEX_ALL_PHOTOS); directory.getPhotos().add(INDEX_ALL_PHOTOS, new Photo(path.hashCode(), path)); directory.setCoverPath(path); photoGridAdapter.notifyDataSetChanged(); //===================开始==========================
Intent intent = new Intent(); ArrayList<String> selectedPhotos =new ArrayList<>(); List<String> selectedPhotosls = photoGridAdapter.getCurrentPhotoPaths(); selectedPhotos.add(selectedPhotosls.get(0)); if (selectedPhotos != null && selectedPhotos.size() > 0) { intent.putStringArrayListExtra(KEY_SELECTED_PHOTOS, selectedPhotos); getActivity().setResult(RESULT_OK, intent); getActivity().finish(); }
//====================结束========================
}
有不对的地方,可以指正^_^
The text was updated successfully, but these errors were encountered:
试了一下 可以的 ,但是选择相册的时候,最新拍的照片没有显示。?? (这个库存在的问题)
Sorry, something went wrong.
No branches or pull requests
感谢donglua大佬做出来的框架,今天添加功能的时候遇到了这个问题,看了一下源码,发现在PhotoPickerFragment中,openCamera()对应的onActivityResult()加上一下代码,可以实现该功能:
if (directories.size() > 0) {
String path = captureManager.getCurrentPhotoPath();
Log.i("获取的图片路径", "onActivityResult: "+path);
PhotoDirectory directory = directories.get(INDEX_ALL_PHOTOS);
directory.getPhotos().add(INDEX_ALL_PHOTOS, new Photo(path.hashCode(), path));
directory.setCoverPath(path);
photoGridAdapter.notifyDataSetChanged();
//===================开始==========================
//====================结束========================
}
有不对的地方,可以指正^_^
The text was updated successfully, but these errors were encountered: