diff --git a/build.gradle b/build.gradle index 8cb50e9e..7fcfd7d3 100644 --- a/build.gradle +++ b/build.gradle @@ -28,11 +28,12 @@ buildscript { repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } maven { url "http://oss.jfrog.org/oss-snapshot-local/" } - mavenCentral() - jcenter() + maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' + classpath 'com.android.tools.build:gradle:3.3.1' classpath 'com.github.xfumihiro.view-inspector:view-inspector-plugin:0.1.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0' @@ -44,7 +45,8 @@ allprojects { repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } maven { url "http://oss.jfrog.org/oss-snapshot-local/" } - jcenter() - mavenLocal() + maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } } diff --git a/examples/build.gradle b/examples/build.gradle index ad01da20..ca6c9e3e 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -52,7 +52,7 @@ dependencies { compile project(':vlayout') compile 'com.crittercism.dexmaker:dexmaker:1.4' compile 'com.squareup.picasso:picasso:2.5.2' - compile 'com.android.support:appcompat-v7:21.0.0' - compile 'com.android.support:support-annotations:21.0.0' - compile 'com.android.support:cardview-v7:23.1.1' + compile 'androidx.appcompat:appcompat:1.0.0' + compile 'androidx.annotation:annotation:1.0.0' + compile 'androidx.cardview:cardview:1.0.0' } diff --git a/examples/proguard-rules.pro b/examples/proguard-rules.pro index 0ffc8889..21a43342 100644 --- a/examples/proguard-rules.pro +++ b/examples/proguard-rules.pro @@ -17,11 +17,11 @@ #} -keepattributes InnerClasses --keep class android.support.v7.widget.RecyclerView$LayoutParams { +-keep class androidx.recyclerview.widget.RecyclerView$LayoutParams { *; } --keep class android.support.v7.widget.RecyclerView$ViewHolder { +-keep class androidx.recyclerview.widget.RecyclerView$ViewHolder { *; } @@ -29,7 +29,7 @@ *; } --keep class android.support.v7.widget.RecyclerView$LayoutManager { +-keep class androidx.recyclerview.widget.RecyclerView$LayoutManager { *; } diff --git a/examples/src/main/java/com/alibaba/android/vlayout/example/DebugActivity.java b/examples/src/main/java/com/alibaba/android/vlayout/example/DebugActivity.java index d37a6762..d84b6698 100644 --- a/examples/src/main/java/com/alibaba/android/vlayout/example/DebugActivity.java +++ b/examples/src/main/java/com/alibaba/android/vlayout/example/DebugActivity.java @@ -14,8 +14,8 @@ import android.app.Activity; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/examples/src/main/java/com/alibaba/android/vlayout/example/MainActivity.java b/examples/src/main/java/com/alibaba/android/vlayout/example/MainActivity.java index a9f505db..79387c14 100644 --- a/examples/src/main/java/com/alibaba/android/vlayout/example/MainActivity.java +++ b/examples/src/main/java/com/alibaba/android/vlayout/example/MainActivity.java @@ -29,7 +29,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; diff --git a/examples/src/main/java/com/alibaba/android/vlayout/example/OnePlusNLayoutActivity.java b/examples/src/main/java/com/alibaba/android/vlayout/example/OnePlusNLayoutActivity.java index c0b5b08e..a4163d8e 100644 --- a/examples/src/main/java/com/alibaba/android/vlayout/example/OnePlusNLayoutActivity.java +++ b/examples/src/main/java/com/alibaba/android/vlayout/example/OnePlusNLayoutActivity.java @@ -30,9 +30,9 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.viewpager.widget.ViewPager; +import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; diff --git a/examples/src/main/java/com/alibaba/android/vlayout/example/RootActivity.java b/examples/src/main/java/com/alibaba/android/vlayout/example/RootActivity.java index 9e941859..e08b5d0a 100644 --- a/examples/src/main/java/com/alibaba/android/vlayout/example/RootActivity.java +++ b/examples/src/main/java/com/alibaba/android/vlayout/example/RootActivity.java @@ -3,7 +3,7 @@ import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; diff --git a/examples/src/main/java/com/alibaba/android/vlayout/example/TestActivity.java b/examples/src/main/java/com/alibaba/android/vlayout/example/TestActivity.java index ccdd581a..69156be1 100644 --- a/examples/src/main/java/com/alibaba/android/vlayout/example/TestActivity.java +++ b/examples/src/main/java/com/alibaba/android/vlayout/example/TestActivity.java @@ -27,8 +27,9 @@ import android.app.Activity; import android.graphics.Rect; import android.os.Bundle; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.StaggeredGridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.StaggeredGridLayoutManager; + import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; diff --git a/examples/src/main/java/com/alibaba/android/vlayout/example/VLayoutActivity.java b/examples/src/main/java/com/alibaba/android/vlayout/example/VLayoutActivity.java index dca43f00..80ac3b9a 100644 --- a/examples/src/main/java/com/alibaba/android/vlayout/example/VLayoutActivity.java +++ b/examples/src/main/java/com/alibaba/android/vlayout/example/VLayoutActivity.java @@ -52,14 +52,13 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewPager; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener; +import androidx.viewpager.widget.ViewPager; +import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.util.Log; -import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -67,7 +66,6 @@ import android.widget.EditText; import android.widget.TextView; -import java.util.ArrayList; import java.util.LinkedList; import java.util.List; diff --git a/examples/src/main/res/layout/main_activity.xml b/examples/src/main/res/layout/main_activity.xml index d8306d07..23099e48 100644 --- a/examples/src/main/res/layout/main_activity.xml +++ b/examples/src/main/res/layout/main_activity.xml @@ -27,12 +27,12 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - + - - \ No newline at end of file + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 3bd1b920..04e25271 100644 --- a/gradle.properties +++ b/gradle.properties @@ -47,6 +47,10 @@ VERSION=1 VERSION_NAME=1.2.22 PACKAGING_TYPE=aar useNewSupportLibrary=true -systemProp.compileSdkVersion=25 -systemProp.targetSdkVersion=25 -systemProp.buildToolsVersion=25.0.3 +systemProp.compileSdkVersion=28 +systemProp.targetSdkVersion=28 +systemProp.buildToolsVersion=28.0.3 + + +android.useAndroidX=true +android.enableJetifier=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3ca3e4e1..7557b52b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,30 +1,6 @@ -# -# MIT License -# -# Copyright (c) 2016 Alibaba Group -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -#Tue Nov 29 17:56:32 CST 2016 +#Thu Mar 14 21:37:11 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip diff --git a/vlayout/build.gradle b/vlayout/build.gradle index e439533c..5d7a254f 100644 --- a/vlayout/build.gradle +++ b/vlayout/build.gradle @@ -28,20 +28,27 @@ buildscript { repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } maven { url "http://oss.jfrog.org/oss-snapshot-local/" } - mavenCentral() - jcenter() +// mavenCentral() +// jcenter() +// google() + maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:3.3.1' } } repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } maven { url "http://oss.jfrog.org/oss-snapshot-local/" } - jcenter() - mavenLocal() +// jcenter() +// mavenLocal() + maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } @@ -105,17 +112,17 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) // compile project(':extension') if (project.hasProperty('useNewSupportLibrary')) { - compile 'com.android.support:recyclerview-v7:25.2.0@aar' - compile('com.android.support:support-v4:25.2.0@aar') - compile 'com.android.support:support-annotations:25.2.0' - compile 'com.android.support:support-compat:25.2.0' - compile 'com.android.support:support-core-ui:25.2.0' + compile 'com.android.support:recyclerview-v7:27.1.1' + compile 'com.android.support:support-v4:27.1.1' + compile 'com.android.support:support-annotations:27.1.1' + compile 'com.android.support:support-compat:27.1.1' + compile 'com.android.support:support-core-ui:27.1.1' } else { - compile 'com.android.support:recyclerview-v7:23.1.1@aar' - compile('com.android.support:support-v4:23.1.1@aar') { + compile 'com.android.support:recyclerview-v7:27.1.1' + compile('com.android.support:support-v4:27.1.1') { exclude group: 'com.android.support', module: 'support-annotations' } - compile 'com.android.support:support-annotations:23.1.1' + compile 'com.android.support:support-annotations:27.1.1' } androidTestCompile "org.robolectric:robolectric:3.0" diff --git a/vlayout/proguard-rules.pro b/vlayout/proguard-rules.pro index f6d41165..0822911d 100644 --- a/vlayout/proguard-rules.pro +++ b/vlayout/proguard-rules.pro @@ -17,11 +17,11 @@ #} -keepattributes InnerClasses --keep class android.support.v7.widget.RecyclerView$LayoutParams { +-keep class androidx.recyclerview.widget.RecyclerView$LayoutParams { *; } --keep class android.support.v7.widget.RecyclerView$ViewHolder { +-keep class androidx.recyclerview.widget.RecyclerView$ViewHolder { *; } @@ -29,11 +29,11 @@ *; } --keep class android.support.v7.widget.RecyclerView$LayoutManager { +-keep class androidx.recyclerview.widget.RecyclerView$LayoutManager { *; } --keep class android.support.v7.widget.LinearLayoutManager { +-keep class androidx.recyclerview.widget.LinearLayoutManager { void ensureLayoutState(); void resolveShouldLayoutReverse(); } \ No newline at end of file diff --git a/vlayout/src/androidTest/java/com/alibaba/android/vlayout/ViewHolderHelper.java b/vlayout/src/androidTest/java/com/alibaba/android/vlayout/ViewHolderHelper.java index c3d2170f..7cfb3c43 100644 --- a/vlayout/src/androidTest/java/com/alibaba/android/vlayout/ViewHolderHelper.java +++ b/vlayout/src/androidTest/java/com/alibaba/android/vlayout/ViewHolderHelper.java @@ -24,7 +24,7 @@ package com.alibaba.android.vlayout; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import java.lang.reflect.Field; import java.lang.reflect.Method; diff --git a/vlayout/src/androidTest/java/com/alibaba/android/vlayout/VirtualLayoutManagerTest.java b/vlayout/src/androidTest/java/com/alibaba/android/vlayout/VirtualLayoutManagerTest.java index 273ffaf0..8e65427f 100644 --- a/vlayout/src/androidTest/java/com/alibaba/android/vlayout/VirtualLayoutManagerTest.java +++ b/vlayout/src/androidTest/java/com/alibaba/android/vlayout/VirtualLayoutManagerTest.java @@ -28,7 +28,7 @@ import android.content.Context; import android.graphics.Rect; import android.os.Looper; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.test.ActivityInstrumentationTestCase2; import android.util.Log; import android.view.View; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/DelegateAdapter.java b/vlayout/src/main/java/com/alibaba/android/vlayout/DelegateAdapter.java index 1373c750..dcf455be 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/DelegateAdapter.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/DelegateAdapter.java @@ -24,9 +24,10 @@ package com.alibaba.android.vlayout; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; + +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.util.Pair; import android.util.SparseArray; import android.view.View; @@ -41,7 +42,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import static android.support.v7.widget.RecyclerView.NO_ID; +import static androidx.recyclerview.widget.RecyclerView.NO_ID; /** * Adapter delegates its responsibility to sub adapters diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java b/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java index b569c353..3102757f 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java @@ -29,10 +29,10 @@ import android.graphics.PointF; import android.os.Bundle; import android.os.Parcelable; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.OrientationHelper; -import android.support.v7.widget.RecyclerView; +import androidx.core.view.ViewCompat; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.OrientationHelper; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; @@ -41,7 +41,6 @@ import java.lang.reflect.Method; import java.util.List; -import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutParams; /** * This class is used to expose layoutChunk method, should not be used in anywhere else diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelper.java index 0b76d856..a4f38fae 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelper.java @@ -26,9 +26,9 @@ import android.graphics.Rect; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import com.alibaba.android.vlayout.layout.LayoutChunkResult; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelperFinder.java b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelperFinder.java index 09f876df..08519160 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelperFinder.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutHelperFinder.java @@ -24,8 +24,8 @@ package com.alibaba.android.vlayout; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.List; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutManagerHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutManagerHelper.java index c1cdded5..d5022f0f 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutManagerHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutManagerHelper.java @@ -24,9 +24,8 @@ package com.alibaba.android.vlayout; -import android.support.annotation.Nullable; -import android.support.v7.widget.OrientationHelper; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; /** @@ -131,21 +130,21 @@ public interface LayoutManagerHelper { /** * Mark a view as hidden, it will show on the screen, - * but can not be access via {@link RecyclerView.LayoutManager#getChildCount()} and {@link android.support.v7.widget.RecyclerView.LayoutManager#getChildAt(int)} + * but can not be access via {@link RecyclerView.LayoutManager#getChildCount()} and {@link androidx.recyclerview.widget.RecyclerView.LayoutManager#getChildAt(int)} * * @param view */ void hideView(View view); /** - * Mark a hidden view re-shown, so you can get it from {@link android.support.v7.widget.RecyclerView.LayoutManager#getChildAt(int)} + * Mark a hidden view re-shown, so you can get it from {@link androidx.recyclerview.widget.RecyclerView.LayoutManager#getChildAt(int)} * * @param view */ void showView(View view); /** - * Get {@link android.support.v7.widget.RecyclerView.ViewHolder} for a view in RecyclerView + * Get {@link androidx.recyclerview.widget.RecyclerView.ViewHolder} for a view in RecyclerView * * @param child * @return diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutViewFactory.java b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutViewFactory.java index 5c9e5019..a0063824 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutViewFactory.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/LayoutViewFactory.java @@ -25,7 +25,7 @@ package com.alibaba.android.vlayout; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; /** diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/OrientationHelperEx.java b/vlayout/src/main/java/com/alibaba/android/vlayout/OrientationHelperEx.java index e3c0764f..ef487810 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/OrientationHelperEx.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/OrientationHelperEx.java @@ -1,6 +1,6 @@ package com.alibaba.android.vlayout; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.LinearLayout; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/Range.java b/vlayout/src/main/java/com/alibaba/android/vlayout/Range.java index 2c17b3ff..0c512910 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/Range.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/Range.java @@ -25,7 +25,7 @@ package com.alibaba.android.vlayout; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Arrays; import java.util.Objects; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/RangeLayoutHelperFinder.java b/vlayout/src/main/java/com/alibaba/android/vlayout/RangeLayoutHelperFinder.java index 3201b7f1..71597c52 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/RangeLayoutHelperFinder.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/RangeLayoutHelperFinder.java @@ -24,8 +24,8 @@ package com.alibaba.android.vlayout; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Arrays; import java.util.Collections; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/RecyclablePagerAdapter.java b/vlayout/src/main/java/com/alibaba/android/vlayout/RecyclablePagerAdapter.java index 8bc39cf2..f19347d1 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/RecyclablePagerAdapter.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/RecyclablePagerAdapter.java @@ -24,9 +24,9 @@ package com.alibaba.android.vlayout; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.RecyclerView; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/SortedList.java b/vlayout/src/main/java/com/alibaba/android/vlayout/SortedList.java index a31c33c0..2113b0d6 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/SortedList.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/SortedList.java @@ -30,7 +30,7 @@ /** * A Sorted list implementation that can keep items in order and also notify for changes in the * list - * such that it can be bound to a {@link android.support.v7.widget.RecyclerView.Adapter + * such that it can be bound to a {@link androidx.recyclerview.widget.RecyclerView.Adapter * RecyclerView.Adapter}. *

* It keeps items ordered using the {@link Callback#compare(Object, Object)} method and uses @@ -490,7 +490,7 @@ public static abstract class Callback { * so * that you can change its behavior depending on your UI. *

- * For example, if you are using SortedList with a {@link android.support.v7.widget.RecyclerView.Adapter + * For example, if you are using SortedList with a {@link androidx.recyclerview.widget.RecyclerView.Adapter * RecyclerView.Adapter}, you should * return whether the items' visual representations are the same or not. * diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutAdapter.java b/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutAdapter.java index d80b065f..dcca68c3 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutAdapter.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutAdapter.java @@ -24,8 +24,8 @@ package com.alibaba.android.vlayout; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import java.util.List; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutManager.java b/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutManager.java index 257d960c..eac5bbe1 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutManager.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/VirtualLayoutManager.java @@ -28,10 +28,11 @@ import android.graphics.Rect; import android.os.Build; import android.os.Trace; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.OrientationHelper; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import androidx.recyclerview.widget.OrientationHelper; +import androidx.recyclerview.widget.RecyclerView; import android.util.AttributeSet; import android.util.Log; import android.util.Pair; @@ -59,10 +60,10 @@ /** - * A {@link android.support.v7.widget.RecyclerView.LayoutManager} implementation which provides + * A {@link androidx.recyclerview.widget.RecyclerView.LayoutManager} implementation which provides * a virtual layout for actual views. *

- * NOTE: it will change {@link android.support.v7.widget.RecyclerView.RecycledViewPool} + * NOTE: it will change {@link androidx.recyclerview.widget.RecyclerView.RecycledViewPool} * for RecyclerView. * * @author villadora diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/extend/InnerRecycledViewPool.java b/vlayout/src/main/java/com/alibaba/android/vlayout/extend/InnerRecycledViewPool.java index 1c9e5081..a3c0783e 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/extend/InnerRecycledViewPool.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/extend/InnerRecycledViewPool.java @@ -24,7 +24,7 @@ package com.alibaba.android.vlayout.extend; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.util.SparseIntArray; import android.view.View; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/extend/PerformanceMonitor.java b/vlayout/src/main/java/com/alibaba/android/vlayout/extend/PerformanceMonitor.java index 7c4ec661..e70eb8d1 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/extend/PerformanceMonitor.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/extend/PerformanceMonitor.java @@ -1,6 +1,6 @@ package com.alibaba.android.vlayout.extend; -import android.support.annotation.Keep; +import androidx.annotation.Keep; import android.view.View; /** diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/extend/ViewLifeCycleHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/extend/ViewLifeCycleHelper.java index 6a248d42..8db65a56 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/extend/ViewLifeCycleHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/extend/ViewLifeCycleHelper.java @@ -1,7 +1,8 @@ package com.alibaba.android.vlayout.extend; -import android.support.annotation.NonNull; -import android.support.v4.util.ArrayMap; +import androidx.annotation.NonNull; +import androidx.collection.ArrayMap; + import android.view.View; import com.alibaba.android.vlayout.VirtualLayoutManager; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/AbstractFullFillLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/AbstractFullFillLayoutHelper.java index 208aaf76..886e429d 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/AbstractFullFillLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/AbstractFullFillLayoutHelper.java @@ -25,9 +25,9 @@ package com.alibaba.android.vlayout.layout; import android.graphics.Rect; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.Recycler; -import android.support.v7.widget.RecyclerView.State; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.Recycler; +import androidx.recyclerview.widget.RecyclerView.State; import android.util.Log; import android.view.View; import android.view.ViewGroup.LayoutParams; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/BaseLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/BaseLayoutHelper.java index 13980db8..be5a6d88 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/BaseLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/BaseLayoutHelper.java @@ -32,9 +32,9 @@ import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/ColumnLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/ColumnLayoutHelper.java index 573d3833..fb16c9c8 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/ColumnLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/ColumnLayoutHelper.java @@ -31,7 +31,7 @@ import com.alibaba.android.vlayout.VirtualLayoutManager; import android.graphics.Rect; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FixLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FixLayoutHelper.java index 7942ca61..2a0d6df3 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FixLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FixLayoutHelper.java @@ -30,7 +30,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.ViewPropertyAnimator; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FloatLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FloatLayoutHelper.java index 8254faf8..d9c8aaf6 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FloatLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/FloatLayoutHelper.java @@ -30,8 +30,8 @@ import android.animation.ObjectAnimator; import android.graphics.Rect; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/GridLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/GridLayoutHelper.java index 1bb49446..94b500cd 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/GridLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/GridLayoutHelper.java @@ -30,9 +30,8 @@ import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutParams; import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper; -import android.support.annotation.NonNull; -import android.support.v7.widget.OrientationHelper; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.util.SparseIntArray; import android.view.View; @@ -40,7 +39,7 @@ import java.util.Arrays; -import static android.support.v7.widget.LinearLayoutManager.VERTICAL; +import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL; /** diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/LinearLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/LinearLayoutHelper.java index b21f47c2..80a8b788 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/LinearLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/LinearLayoutHelper.java @@ -30,12 +30,12 @@ import com.alibaba.android.vlayout.VirtualLayoutManager.AnchorInfoWrapper; import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutParams; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.State; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.State; import android.util.Log; import android.view.View; -import static android.support.v7.widget.LinearLayoutManager.VERTICAL; +import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL; /** diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelper.java index f6943687..b2d03f62 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelper.java @@ -34,9 +34,9 @@ import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper; import android.graphics.Rect; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.State; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.State; import android.view.View; import android.view.View.MeasureSpec; import android.view.ViewGroup; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelperEx.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelperEx.java index 03eea1a1..64e6cb3a 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelperEx.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/OnePlusNLayoutHelperEx.java @@ -25,7 +25,7 @@ package com.alibaba.android.vlayout.layout; import android.graphics.Rect; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.View.MeasureSpec; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeGridLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeGridLayoutHelper.java index 9869032f..a3858a2b 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeGridLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeGridLayoutHelper.java @@ -35,15 +35,15 @@ import com.alibaba.android.vlayout.layout.GridLayoutHelper.DefaultSpanSizeLookup; import com.alibaba.android.vlayout.layout.GridLayoutHelper.SpanSizeLookup; -import android.support.annotation.NonNull; -import android.support.v4.util.ArrayMap; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.Recycler; -import android.support.v7.widget.RecyclerView.State; +import androidx.annotation.NonNull; +import androidx.collection.ArrayMap; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.Recycler; +import androidx.recyclerview.widget.RecyclerView.State; import android.util.Log; import android.view.View; -import static android.support.v7.widget.LinearLayoutManager.VERTICAL; +import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL; /** * LayoutHelper provides RangeGridLayoutHelper. The difference with {@link GridLayoutHelper} is that this layoutHelper could has child group logically but implemented as flat. diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeStyle.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeStyle.java index 160a7bb6..422f3832 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeStyle.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/RangeStyle.java @@ -11,11 +11,11 @@ import com.alibaba.android.vlayout.layout.BaseLayoutHelper.LayoutViewUnBindListener; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.v4.util.ArrayMap; -import android.support.v4.util.SimpleArrayMap; -import android.support.v7.widget.OrientationHelper; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.collection.ArrayMap; +import androidx.collection.SimpleArrayMap; + +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/SingleLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/SingleLayoutHelper.java index 56985390..62fa8c1f 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/SingleLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/SingleLayoutHelper.java @@ -28,7 +28,7 @@ import com.alibaba.android.vlayout.OrientationHelperEx; import com.alibaba.android.vlayout.VirtualLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import static com.alibaba.android.vlayout.VirtualLayoutManager.VERTICAL; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StaggeredGridLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StaggeredGridLayoutHelper.java index d1df4a88..ae01e363 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StaggeredGridLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StaggeredGridLayoutHelper.java @@ -39,14 +39,14 @@ import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.LayoutParams; +import androidx.annotation.NonNull; +import androidx.core.view.ViewCompat; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.LayoutParams; import android.util.Log; import android.view.View; -import static android.support.v7.widget.LinearLayoutManager.INVALID_OFFSET; +import static androidx.recyclerview.widget.LinearLayoutManager.INVALID_OFFSET; import static com.alibaba.android.vlayout.VirtualLayoutManager.HORIZONTAL; import static com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper.LAYOUT_END; import static com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper.LAYOUT_START; diff --git a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StickyLayoutHelper.java b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StickyLayoutHelper.java index 39c11db7..a0f12b58 100644 --- a/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StickyLayoutHelper.java +++ b/vlayout/src/main/java/com/alibaba/android/vlayout/layout/StickyLayoutHelper.java @@ -24,8 +24,8 @@ package com.alibaba.android.vlayout.layout; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.View; @@ -35,7 +35,7 @@ import com.alibaba.android.vlayout.VirtualLayoutManager; import com.alibaba.android.vlayout.VirtualLayoutManager.LayoutStateWrapper; -import static android.support.v7.widget.LinearLayoutManager.VERTICAL; +import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL; /**