From f6035a576ad0bc0f38977c3b829f57a334a33e01 Mon Sep 17 00:00:00 2001 From: LiuShilin <503233512@qq.com> Date: Wed, 5 Apr 2017 14:37:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B00.5.1=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=85=A8=E5=B1=80=E5=88=B7=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 4 ++-- bintray.gradle | 2 +- .../com/lzy/imagepicker/adapter/ImageRecyclerAdapter.java | 4 +++- .../main/java/com/lzy/imagepicker/ui/ImageGridActivity.java | 3 ++- imagepicker/src/main/res/layout/activity_image_preview.xml | 1 + 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f692451..9fb0e2a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,6 +31,6 @@ dependencies { compile 'com.lzy.widget:view-core:0.2.1' - compile 'com.lzy.widget:imagepicker:0.5.0' -// compile project(':imagepicker') +// compile 'com.lzy.widget:imagepicker:0.5.0' + compile project(':imagepicker') } diff --git a/bintray.gradle b/bintray.gradle index a0732da..2783e60 100644 --- a/bintray.gradle +++ b/bintray.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' -version = "0.5.0" // 数据仓库依赖第三部分 +version = "0.5.1" // 数据仓库依赖第三部分 def siteUrl = 'https://github.com/jeasonlzy0216/NineGridView' def gitUrl = 'https://github.com/jeasonlzy0216/NineGridView.git' diff --git a/imagepicker/src/main/java/com/lzy/imagepicker/adapter/ImageRecyclerAdapter.java b/imagepicker/src/main/java/com/lzy/imagepicker/adapter/ImageRecyclerAdapter.java index 3acfffc..d3a799a 100644 --- a/imagepicker/src/main/java/com/lzy/imagepicker/adapter/ImageRecyclerAdapter.java +++ b/imagepicker/src/main/java/com/lzy/imagepicker/adapter/ImageRecyclerAdapter.java @@ -27,7 +27,9 @@ * * 用于替换原项目的GridView,使用局部刷新解决选中照片出现闪动问题 * - * 替换为RecyclerView后并没有通过局部刷新解决,可能是picasso图片加载框架的问题 + * 替换为RecyclerView后只是不再会导致全局刷新, + * + * 但还是会出现明显的重新加载图片,可能是picasso图片加载框架的问题 * * Author: nanchen * Email: liushilin520@foxmail.com diff --git a/imagepicker/src/main/java/com/lzy/imagepicker/ui/ImageGridActivity.java b/imagepicker/src/main/java/com/lzy/imagepicker/ui/ImageGridActivity.java index e79cac4..bc73aeb 100644 --- a/imagepicker/src/main/java/com/lzy/imagepicker/ui/ImageGridActivity.java +++ b/imagepicker/src/main/java/com/lzy/imagepicker/ui/ImageGridActivity.java @@ -289,7 +289,7 @@ public void onImageSelected(int position, ImageItem item, boolean isAdd) { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); - if (data != null) { + if (data != null && data.getExtras() != null) { if (resultCode == ImagePicker.RESULT_CODE_BACK) { isOrigin = data.getBooleanExtra(ImagePreviewActivity.ISORIGIN, false); } else { @@ -347,4 +347,5 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { } } } + } \ No newline at end of file diff --git a/imagepicker/src/main/res/layout/activity_image_preview.xml b/imagepicker/src/main/res/layout/activity_image_preview.xml index b3eeb9c..1f7177f 100644 --- a/imagepicker/src/main/res/layout/activity_image_preview.xml +++ b/imagepicker/src/main/res/layout/activity_image_preview.xml @@ -25,6 +25,7 @@