RxGalleryFinal
RxGalleryFinal copied to clipboard
确认按钮连续点击问题
选中多张图片后,连续点击确认按钮,返回张数等于选中张数*点击次数
RxGalleryFinal.with(mContext).image().multiple().maxSize(max) .imageLoader(ImageLoaderType.PICASSO) .hideCamera() .subscribe(new RxBusResultDisposable<ImageMultipleResultEvent>() { @Override protected void onEvent(ImageMultipleResultEvent imageMultipleResultEvent) throws Exception {
for (int i = 0; i < imageMultipleResultEvent.getResult().size(); i++) {
PhotoBean photoBean = new PhotoBean();
MediaBean mediaBean = imageMultipleResultEvent.getResult().get(i);
String temp = "LmCity" + System.currentTimeMillis();
photoBean.setFileName(temp);
Bitmap bitmap = FileUtil.OpenSDCardPhoto(mediaBean.getThumbnailBigPath());
photoBean.setBitmap(BitmapUtil.compressImage(bitmap));
photoBean.setCompressionFile(BitmapUtil.compressImage(bitmap), temp);
photoBean.setLayoutId(R.layout.item_selected_photo);
photoBean.setUrl();
photoBean.setNeedUpload(true);
bean.getUploadPhotoes().add(0, photoBean);
max--;
}
mAdapter.notifyDataSetChanged();
if (bean.getUploadPhotoes().size() > 1) {
mGoodPhotosPromptView.setVisibility(GONE);
}
}
}).openGallery();
GET