From 24173b4e35fa4b91a32cc08481cd52194e44f82f Mon Sep 17 00:00:00 2001 From: czm Date: Tue, 23 Jul 2019 17:31:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7glide=E5=8F=8A?= =?UTF-8?q?=E8=BD=AC=E5=88=B0AndroidX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 21 ++++++++++++++---- .../FullyGridLayoutManager.java | 4 ++-- .../luck/pictureselector/MainActivity.java | 8 +++---- .../luck/pictureselector/PhotoFragment.java | 10 ++++----- .../PhotoFragmentActivity.java | 2 +- .../luck/pictureselector/SimpleActivity.java | 2 +- .../adapter/GridImageAdapter.java | 4 ++-- app/src/main/res/layout/activity_main.xml | 2 +- build.gradle | 2 +- config.gradle | 4 ++-- gradle.properties | 4 +++- gradle/wrapper/gradle-wrapper.properties | 4 ++-- picture_library/build.gradle | 14 ++++++------ .../luck/picture/lib/PictureBaseActivity.java | 6 ++--- .../lib/PictureExternalPreviewActivity.java | 6 ++--- .../luck/picture/lib/PictureFileProvider.java | 2 +- .../picture/lib/PicturePreviewActivity.java | 4 ++-- .../picture/lib/PictureSelectionModel.java | 10 ++++----- .../com/luck/picture/lib/PictureSelector.java | 4 ++-- .../picture/lib/PictureSelectorActivity.java | 10 ++++----- .../adapter/PictureAlbumDirectoryAdapter.java | 6 ++--- .../lib/adapter/PictureImageGridAdapter.java | 4 ++-- .../lib/adapter/SimpleFragmentAdapter.java | 2 +- .../picture/lib/config/PictureMimeType.java | 2 +- .../lib/config/PictureSelectionConfig.java | 2 +- .../decoration/GridSpacingItemDecoration.java | 2 +- .../lib/decoration/RecycleViewDivider.java | 6 ++--- .../lib/immersive/ImmersiveManage.java | 2 +- .../picture/lib/model/LocalMediaLoader.java | 3 +-- .../lib/permissions/RxPermissions.java | 2 +- .../permissions/RxPermissionsFragment.java | 2 +- .../lib/photoview/PhotoViewAttacher.java | 2 +- .../com/luck/picture/lib/rxbus2/RxUtils.java | 2 +- .../picture/lib/tools/PictureFileUtils.java | 2 +- .../picture/lib/widget/FolderPopWindow.java | 6 ++--- .../picture/lib/widget/PreviewViewPager.java | 2 +- .../longimage/CompatDecoderFactory.java | 2 +- .../longimage/SubsamplingScaleImageView.java | 4 ++-- .../src/main/res/layout/picture_selector.xml | 2 +- .../main/res/layout/picture_window_folder.xml | 2 +- ucrop/build.gradle | 8 ++++--- .../ucrop/PictureMultiCuttingActivity.java | 22 +++++++++---------- .../ucrop/PicturePhotoGalleryAdapter.java | 2 +- .../main/java/com/yalantis/ucrop/UCrop.java | 16 +++++++------- .../com/yalantis/ucrop/UCropActivity.java | 18 +++++++-------- .../java/com/yalantis/ucrop/UCropMulti.java | 16 +++++++------- .../ucrop/callback/BitmapCropCallback.java | 2 +- .../ucrop/callback/BitmapLoadCallback.java | 4 ++-- .../com/yalantis/ucrop/model/AspectRatio.java | 2 +- .../yalantis/ucrop/task/BitmapCropTask.java | 4 ++-- .../yalantis/ucrop/task/BitmapLoadTask.java | 6 ++--- .../yalantis/ucrop/util/BitmapLoadUtils.java | 4 ++-- .../com/yalantis/ucrop/util/FileUtils.java | 2 +- .../ucrop/util/RotationGestureDetector.java | 2 +- .../yalantis/ucrop/view/CropImageView.java | 6 ++--- .../com/yalantis/ucrop/view/OverlayView.java | 6 ++--- .../ucrop/view/TransformImageView.java | 6 ++--- .../com/yalantis/ucrop/view/UCropView.java | 2 +- .../view/widget/AspectRatioTextView.java | 6 ++--- .../widget/HorizontalProgressWheelView.java | 4 ++-- .../res/layout/ucrop_activity_photobox.xml | 4 ++-- .../ucrop_picture_activity_multi_cutting.xml | 6 ++--- 62 files changed, 170 insertions(+), 158 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bfab01b30..22506c57a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,8 +25,21 @@ android { } dependencies { - compile project(':picture_library') - testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' - debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' - releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.recyclerview:recyclerview:1.1.0-beta01' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + + implementation "io.reactivex.rxjava2:rxjava:${cfgs.rxjava}" + implementation "io.reactivex.rxjava2:rxandroid:${cfgs.rxandroid}" + + implementation project(':picture_library') + testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.1' + releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' + + //glide + implementation 'com.github.bumptech.glide:glide:4.9.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + } diff --git a/app/src/main/java/com/luck/pictureselector/FullyGridLayoutManager.java b/app/src/main/java/com/luck/pictureselector/FullyGridLayoutManager.java index 435f9904d..66ed12574 100644 --- a/app/src/main/java/com/luck/pictureselector/FullyGridLayoutManager.java +++ b/app/src/main/java/com/luck/pictureselector/FullyGridLayoutManager.java @@ -1,8 +1,8 @@ package com.luck.pictureselector; import android.content.Context; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/luck/pictureselector/MainActivity.java b/app/src/main/java/com/luck/pictureselector/MainActivity.java index 3adf6cf06..712451dcf 100644 --- a/app/src/main/java/com/luck/pictureselector/MainActivity.java +++ b/app/src/main/java/com/luck/pictureselector/MainActivity.java @@ -4,10 +4,10 @@ import android.content.Intent; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.IdRes; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.IdRes; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.CheckBox; diff --git a/app/src/main/java/com/luck/pictureselector/PhotoFragment.java b/app/src/main/java/com/luck/pictureselector/PhotoFragment.java index cb2e42b8d..fddab0720 100644 --- a/app/src/main/java/com/luck/pictureselector/PhotoFragment.java +++ b/app/src/main/java/com/luck/pictureselector/PhotoFragment.java @@ -3,11 +3,11 @@ import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.IdRes; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.IdRes; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/luck/pictureselector/PhotoFragmentActivity.java b/app/src/main/java/com/luck/pictureselector/PhotoFragmentActivity.java index 5e1c017ff..80af023ec 100644 --- a/app/src/main/java/com/luck/pictureselector/PhotoFragmentActivity.java +++ b/app/src/main/java/com/luck/pictureselector/PhotoFragmentActivity.java @@ -2,7 +2,7 @@ import android.Manifest; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.widget.Toast; import com.luck.picture.lib.config.PictureConfig; diff --git a/app/src/main/java/com/luck/pictureselector/SimpleActivity.java b/app/src/main/java/com/luck/pictureselector/SimpleActivity.java index b0125bfb3..e7ca75112 100644 --- a/app/src/main/java/com/luck/pictureselector/SimpleActivity.java +++ b/app/src/main/java/com/luck/pictureselector/SimpleActivity.java @@ -1,7 +1,7 @@ package com.luck.pictureselector; import android.content.Intent; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; diff --git a/app/src/main/java/com/luck/pictureselector/adapter/GridImageAdapter.java b/app/src/main/java/com/luck/pictureselector/adapter/GridImageAdapter.java index 7898335f8..d9134682c 100644 --- a/app/src/main/java/com/luck/pictureselector/adapter/GridImageAdapter.java +++ b/app/src/main/java/com/luck/pictureselector/adapter/GridImageAdapter.java @@ -2,8 +2,8 @@ import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 07d4ec340..1cbb4e3e5 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -48,7 +48,7 @@ android:textSize="15sp" /> - - - - - + - - + - Date: Wed, 14 Aug 2019 09:04:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(lib):=20=E4=BF=AE=E6=AD=A3=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9=E5=BC=80=E5=90=AF=E5=90=8ENullPointerException?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/luck/picture/lib/compress/Luban.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picture_library/src/main/java/com/luck/picture/lib/compress/Luban.java b/picture_library/src/main/java/com/luck/picture/lib/compress/Luban.java index a8c64a797..e51b5024b 100755 --- a/picture_library/src/main/java/com/luck/picture/lib/compress/Luban.java +++ b/picture_library/src/main/java/com/luck/picture/lib/compress/Luban.java @@ -314,7 +314,7 @@ public InputStream openInternal() throws IOException { @Override public String getPath() { - return media.isCut() ? media.getCutPath() : media.getCompressPath(); + return media.isCut() ? media.getCutPath() : media.getPath();//media.getCompressPath(); } }); From 8c2ef283120f92684d2984fd4d98440d622202f7 Mon Sep 17 00:00:00 2001 From: czhongm Date: Wed, 14 Aug 2019 09:39:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor(all):=20=E5=8D=87=E7=BA=A7RxJava?= =?UTF-8?q?=E5=92=8CRxAndroid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.gradle b/config.gradle index 1efceef18..59e0d466c 100644 --- a/config.gradle +++ b/config.gradle @@ -12,7 +12,7 @@ ext { //open version control androidSupportVersion: "28.0.0", glide : "4.9.0", - rxjava : "2.1.3", - rxandroid : "2.1.0" + rxjava : "2.2.10", + rxandroid : "2.1.1" ] } \ No newline at end of file