Skip to content
New issue

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

多选模式下调用拍照会有错误出现 #71

Open
maybesong opened this issue Jul 16, 2020 · 0 comments
Open

多选模式下调用拍照会有错误出现 #71

maybesong opened this issue Jul 16, 2020 · 0 comments

Comments

@maybesong
Copy link

在多选模式下拍照,成功后会返回一张图片,但是再打开选择图片的界面时,最新拍摄的那张照片并没有被选中

其原因是ImageGridActivity的onActivityResult方法里,Line364,有

String path = imagePicker.getTakeImageFile().getAbsolutePath();
ImageItem imageItem = new ImageItem();
imageItem.path = path;

但是没有对imageItem的addTime做初始化,导致imagePicker.mSelectedImages中的对象和adapter中的对象不能匹配上

注意ImageItem的equal方法
return this.path.equalsIgnoreCase(item.path) && this.addTime == item.addTime;
是要path和addTime同时匹配的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant