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" /> - - - - - + - - + -