From 66cf448cf7cc838018f872fd40343322c3a1cbbf Mon Sep 17 00:00:00 2001 From: bingoogolapple Date: Fri, 1 Jul 2016 13:09:16 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.1=20=E6=8B=8D=E7=85=A7=E5=90=8E=E6=8C=89?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=94=AE=E5=88=A0=E9=99=A4=E5=88=9A=E6=89=8D?= =?UTF-8?q?=E6=8B=8D=E6=91=84=E7=9A=84=E7=85=A7=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/build.gradle | 2 +- gradle.properties | 4 ++-- library/build.gradle | 2 +- .../photopicker/activity/BGAPhotoPickerActivity.java | 6 +++++- .../photopicker/util/BGAImageCaptureManager.java | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/demo/build.gradle b/demo/build.gradle index ac818b2..d8cb8f9 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -22,7 +22,7 @@ dependencies { // compile project(':library') - compile 'cn.bingoogolapple:bga-photopicker:1.0.0@aar' + compile 'cn.bingoogolapple:bga-photopicker:1.0.1@aar' // 必须依赖下面四个图片加载库中的某一个 diff --git a/gradle.properties b/gradle.properties index aa711da..8c5b365 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,5 +3,5 @@ ANDROID_BUILD_TARGET_SDK_VERSION=24 ANDROID_BUILD_SDK_VERSION=24 ANDROID_BUILD_TOOLS_VERSION=24.0.0 -VERSION_NAME=1.0.0 -VERSION_CODE=100 \ No newline at end of file +VERSION_NAME=1.0.1 +VERSION_CODE=101 \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index a39d2ef..f694b44 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -22,4 +22,4 @@ dependencies { } // gradle uploadArchives -apply from: 'https://raw.githubusercontent.com/bingoogolapple/PublishAar/master/central-publish.gradle' \ No newline at end of file +//apply from: 'https://raw.githubusercontent.com/bingoogolapple/PublishAar/master/central-publish.gradle' \ No newline at end of file diff --git a/library/src/main/java/cn/bingoogolapple/photopicker/activity/BGAPhotoPickerActivity.java b/library/src/main/java/cn/bingoogolapple/photopicker/activity/BGAPhotoPickerActivity.java index e4622c0..8fd903c 100644 --- a/library/src/main/java/cn/bingoogolapple/photopicker/activity/BGAPhotoPickerActivity.java +++ b/library/src/main/java/cn/bingoogolapple/photopicker/activity/BGAPhotoPickerActivity.java @@ -246,12 +246,16 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { photos.add(mImageCaptureManager.getCurrentPhotoPath()); startActivityForResult(BGAPhotoPickerPreviewActivity.newIntent(this, 1, photos, photos, 0, true), REQUEST_CODE_PREVIEW); } else if (requestCode == REQUEST_CODE_PREVIEW) { + if (BGAPhotoPickerPreviewActivity.getIsFromTakePhoto(data)) { + // 从拍照预览界面返回,刷新图库 + mImageCaptureManager.refreshGallery(); + } + returnSelectedImages(BGAPhotoPickerPreviewActivity.getSelectedImages(data)); } } else if (resultCode == RESULT_CANCELED && requestCode == REQUEST_CODE_PREVIEW) { if (BGAPhotoPickerPreviewActivity.getIsFromTakePhoto(data)) { // 从拍照预览界面返回,删除之前拍的照片 - mImageCaptureManager.deletePhotoFile(); } else { mPicAdapter.setSelectedImages(BGAPhotoPickerPreviewActivity.getSelectedImages(data)); diff --git a/library/src/main/java/cn/bingoogolapple/photopicker/util/BGAImageCaptureManager.java b/library/src/main/java/cn/bingoogolapple/photopicker/util/BGAImageCaptureManager.java index b74c344..5ce658b 100644 --- a/library/src/main/java/cn/bingoogolapple/photopicker/util/BGAImageCaptureManager.java +++ b/library/src/main/java/cn/bingoogolapple/photopicker/util/BGAImageCaptureManager.java @@ -64,7 +64,7 @@ public Intent getTakePictureIntent() throws IOException { * 刷新图库 */ public void refreshGallery() { - if (mCurrentPhotoPath != null) { + if (!TextUtils.isEmpty(mCurrentPhotoPath)) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); mediaScanIntent.setData(Uri.fromFile(new File(mCurrentPhotoPath))); mContext.sendBroadcast(mediaScanIntent);