From f7cc10b33e8c36720bea0ec6b6b0927d8d70bd87 Mon Sep 17 00:00:00 2001 From: vikasraimeesho <100354478+vikasraimeesho@users.noreply.github.com> Date: Thu, 24 Nov 2022 22:12:23 +0530 Subject: [PATCH 1/2] migrate to androidX and targetSDK 31 --- .idea/compiler.xml | 7 +- .idea/gradle.xml | 7 +- .idea/misc.xml | 34 +- .idea/modules.xml | 15 +- .idea/runConfigurations.xml | 12 - CircleIndicator.iml | 13 +- LoopingViewPager/LoopingViewPager.iml | 149 ------- LoopingViewPager/build.gradle | 2 +- .../viewPager/LoopPagerAdapterWrapper.java | 6 +- .../com/imbryk/viewPager/LoopViewPager.java | 4 +- circleindicator/build.gradle | 10 +- circleindicator/circleindicator.iml | 359 ----------------- .../circleindicator/CircleIndicator.java | 6 +- .../circleindicator/SnackbarBehavior.java | 6 +- gradle.properties | 1 + sample/build.gradle | 10 +- sample/sample.iml | 365 ------------------ .../sample/SampleActivity.java | 18 +- .../sample/SamplePagerAdapter.java | 2 +- .../sample/fragment/ChangeColorFragment.java | 6 +- .../fragment/CustomAnimationFragment.java | 6 +- .../sample/fragment/DefaultFragment.java | 6 +- .../fragment/DynamicAdapterFragment.java | 6 +- .../fragment/LoopViewPagerFragment.java | 4 +- .../sample/fragment/ResetAdapterFragment.java | 6 +- .../fragment/SnackbarBehaviorFragment.java | 8 +- .../src/main/res/layout/activity_sample.xml | 2 +- .../layout/fragment_sample_change_color.xml | 2 +- .../fragment_sample_custom_animation.xml | 2 +- .../res/layout/fragment_sample_default.xml | 2 +- .../fragment_sample_dynamic_adapter.xml | 6 +- .../layout/fragment_sample_reset_adapter.xml | 4 +- .../fragment_sample_snackbar_behavior.xml | 8 +- .../main/res/layout/viewpager_activity.xml | 6 +- 34 files changed, 107 insertions(+), 993 deletions(-) delete mode 100644 .idea/runConfigurations.xml delete mode 100644 LoopingViewPager/LoopingViewPager.iml delete mode 100644 circleindicator/circleindicator.iml delete mode 100644 sample/sample.iml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 1f2af51..f861765 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,7 +1,6 @@ - @@ -12,10 +11,6 @@ - - - - - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index aecc214..2e47b35 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,13 +1,13 @@ + diff --git a/.idea/misc.xml b/.idea/misc.xml index 2f00a30..6875b3b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,28 +1,40 @@ - - - @@ -47,17 +59,7 @@ - - - - - - - - - - - + diff --git a/.idea/modules.xml b/.idea/modules.xml index 5545003..a8d8330 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,9 +3,18 @@ - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/CircleIndicator.iml b/CircleIndicator.iml index 5b07567..c781e7e 100644 --- a/CircleIndicator.iml +++ b/CircleIndicator.iml @@ -1,17 +1,10 @@ - - - - - - - - + + + diff --git a/LoopingViewPager/LoopingViewPager.iml b/LoopingViewPager/LoopingViewPager.iml deleted file mode 100644 index dd820e7..0000000 --- a/LoopingViewPager/LoopingViewPager.iml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/LoopingViewPager/build.gradle b/LoopingViewPager/build.gradle index 1b03362..452dfca 100644 --- a/LoopingViewPager/build.gradle +++ b/LoopingViewPager/build.gradle @@ -18,5 +18,5 @@ android { } dependencies { - compile 'com.android.support:support-v4:28.0.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' } diff --git a/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopPagerAdapterWrapper.java b/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopPagerAdapterWrapper.java index fdc756a..9c44153 100644 --- a/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopPagerAdapterWrapper.java +++ b/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopPagerAdapterWrapper.java @@ -16,9 +16,9 @@ package com.imbryk.viewPager; import android.os.Parcelable; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.view.PagerAdapter; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.PagerAdapter; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; diff --git a/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopViewPager.java b/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopViewPager.java index a9f4f21..4547e2e 100644 --- a/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopViewPager.java +++ b/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopViewPager.java @@ -16,8 +16,8 @@ package com.imbryk.viewPager; import android.content.Context; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import java.util.ArrayList; import java.util.List; diff --git a/circleindicator/build.gradle b/circleindicator/build.gradle index 382e5eb..6097efe 100644 --- a/circleindicator/build.gradle +++ b/circleindicator/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'com.android.library' version = "2.1.3" android { - compileSdkVersion 28 + compileSdkVersion 31 defaultConfig { minSdkVersion 14 - targetSdkVersion 28 + targetSdkVersion 31 versionCode 122 versionName version } @@ -21,9 +21,9 @@ android { } dependencies { - compile 'com.android.support:support-annotations:28.0.0' - compile 'com.android.support:support-core-ui:28.0.0' - provided 'com.android.support:design:28.0.0' + implementation 'androidx.annotation:annotation:1.3.0' + implementation 'androidx.legacy:legacy-support-core-ui:1.0.0' + implementation 'com.google.android.material:material:1.2.1' } //apply from: "upload-jcenter.gradle" diff --git a/circleindicator/circleindicator.iml b/circleindicator/circleindicator.iml deleted file mode 100644 index 3458d31..0000000 --- a/circleindicator/circleindicator.iml +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/circleindicator/src/main/java/me/relex/circleindicator/CircleIndicator.java b/circleindicator/src/main/java/me/relex/circleindicator/CircleIndicator.java index 26fcbfe..965a58a 100644 --- a/circleindicator/src/main/java/me/relex/circleindicator/CircleIndicator.java +++ b/circleindicator/src/main/java/me/relex/circleindicator/CircleIndicator.java @@ -7,9 +7,9 @@ import android.content.res.TypedArray; import android.database.DataSetObserver; import android.os.Build; -import android.support.annotation.AnimatorRes; -import android.support.annotation.DrawableRes; -import android.support.v4.view.ViewPager; +import androidx.annotation.AnimatorRes; +import androidx.annotation.DrawableRes; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; diff --git a/circleindicator/src/main/java/me/relex/circleindicator/SnackbarBehavior.java b/circleindicator/src/main/java/me/relex/circleindicator/SnackbarBehavior.java index bda1d64..6a45656 100644 --- a/circleindicator/src/main/java/me/relex/circleindicator/SnackbarBehavior.java +++ b/circleindicator/src/main/java/me/relex/circleindicator/SnackbarBehavior.java @@ -1,9 +1,9 @@ package me.relex.circleindicator; import android.content.Context; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.Snackbar; -import android.support.v4.view.ViewCompat; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.google.android.material.snackbar.Snackbar; +import androidx.core.view.ViewCompat; import android.util.AttributeSet; import android.view.View; import java.util.List; diff --git a/gradle.properties b/gradle.properties index ba57b87..895c5ef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,4 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +android.useAndroidX=true \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index 849438b..f01bca6 100755 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -24,9 +24,9 @@ android { } dependencies { - compile 'com.android.support:design:28.0.0' - compile 'com.android.support:appcompat-v7:28.0.0' - compile 'com.android.support:recyclerview-v7:28.0.0' - compile project(':circleindicator') - compile project(':LoopingViewPager') + implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation project(':circleindicator') + implementation project(':LoopingViewPager') } diff --git a/sample/sample.iml b/sample/sample.iml deleted file mode 100644 index 3e83f14..0000000 --- a/sample/sample.iml +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sample/src/main/java/me/relex/circleindicator/sample/SampleActivity.java b/sample/src/main/java/me/relex/circleindicator/sample/SampleActivity.java index ba67b55..88d0a0a 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/SampleActivity.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/SampleActivity.java @@ -1,15 +1,15 @@ package me.relex.circleindicator.sample; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/SamplePagerAdapter.java b/sample/src/main/java/me/relex/circleindicator/sample/SamplePagerAdapter.java index c00b64a..b38db07 100755 --- a/sample/src/main/java/me/relex/circleindicator/sample/SamplePagerAdapter.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/SamplePagerAdapter.java @@ -1,7 +1,7 @@ package me.relex.circleindicator.sample; import android.graphics.Color; -import android.support.v4.view.PagerAdapter; +import androidx.viewpager.widget.PagerAdapter; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/ChangeColorFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/ChangeColorFragment.java index 87fa8b3..a39ae95 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/ChangeColorFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/ChangeColorFragment.java @@ -1,9 +1,9 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/CustomAnimationFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/CustomAnimationFragment.java index 02ceec4..791b245 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/CustomAnimationFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/CustomAnimationFragment.java @@ -1,9 +1,9 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/DefaultFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/DefaultFragment.java index c511fae..4433347 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/DefaultFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/DefaultFragment.java @@ -1,9 +1,9 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/DynamicAdapterFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/DynamicAdapterFragment.java index 49c1c01..d81d305 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/DynamicAdapterFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/DynamicAdapterFragment.java @@ -1,9 +1,9 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/LoopViewPagerFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/LoopViewPagerFragment.java index 2766e40..18c7476 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/LoopViewPagerFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/LoopViewPagerFragment.java @@ -1,8 +1,8 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/ResetAdapterFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/ResetAdapterFragment.java index 3d3e398..aee2fbe 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/ResetAdapterFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/ResetAdapterFragment.java @@ -1,9 +1,9 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/java/me/relex/circleindicator/sample/fragment/SnackbarBehaviorFragment.java b/sample/src/main/java/me/relex/circleindicator/sample/fragment/SnackbarBehaviorFragment.java index 9b38b72..0c68769 100644 --- a/sample/src/main/java/me/relex/circleindicator/sample/fragment/SnackbarBehaviorFragment.java +++ b/sample/src/main/java/me/relex/circleindicator/sample/fragment/SnackbarBehaviorFragment.java @@ -1,10 +1,10 @@ package me.relex.circleindicator.sample.fragment; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; -import android.support.v4.app.Fragment; -import android.support.v4.view.ViewPager; +import androidx.annotation.Nullable; +import com.google.android.material.snackbar.Snackbar; +import androidx.fragment.app.Fragment; +import androidx.viewpager.widget.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/sample/src/main/res/layout/activity_sample.xml b/sample/src/main/res/layout/activity_sample.xml index d8462e6..e101f09 100644 --- a/sample/src/main/res/layout/activity_sample.xml +++ b/sample/src/main/res/layout/activity_sample.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - - diff --git a/sample/src/main/res/layout/fragment_sample_custom_animation.xml b/sample/src/main/res/layout/fragment_sample_custom_animation.xml index 37339e8..44576c5 100755 --- a/sample/src/main/res/layout/fragment_sample_custom_animation.xml +++ b/sample/src/main/res/layout/fragment_sample_custom_animation.xml @@ -4,7 +4,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - diff --git a/sample/src/main/res/layout/fragment_sample_default.xml b/sample/src/main/res/layout/fragment_sample_default.xml index eae23c5..6077791 100755 --- a/sample/src/main/res/layout/fragment_sample_default.xml +++ b/sample/src/main/res/layout/fragment_sample_default.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - diff --git a/sample/src/main/res/layout/fragment_sample_dynamic_adapter.xml b/sample/src/main/res/layout/fragment_sample_dynamic_adapter.xml index bef7fd5..e28002d 100755 --- a/sample/src/main/res/layout/fragment_sample_dynamic_adapter.xml +++ b/sample/src/main/res/layout/fragment_sample_dynamic_adapter.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - @@ -15,7 +15,7 @@ android:layout_gravity="bottom" android:layout_marginBottom="48dp"/> - - - @@ -15,7 +15,7 @@ android:layout_gravity="bottom" android:layout_marginBottom="48dp"/> - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/sample/src/main/res/layout/viewpager_activity.xml b/sample/src/main/res/layout/viewpager_activity.xml index dd35f79..3ad345c 100755 --- a/sample/src/main/res/layout/viewpager_activity.xml +++ b/sample/src/main/res/layout/viewpager_activity.xml @@ -10,7 +10,7 @@ android:layout_height="0dp" android:layout_weight="1"> - @@ -28,7 +28,7 @@ android:layout_height="0dp" android:layout_weight="1"> - @@ -53,7 +53,7 @@ android:layout_height="0dp" android:layout_weight="1"> - From 545f1520588bd9af5ea8a4341ae305e6c17aecc6 Mon Sep 17 00:00:00 2001 From: vikasraimeesho <100354478+vikasraimeesho@users.noreply.github.com> Date: Wed, 30 Nov 2022 16:41:39 +0530 Subject: [PATCH 2/2] reverted targetSDK --- circleindicator/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circleindicator/build.gradle b/circleindicator/build.gradle index 6097efe..48f47ab 100644 --- a/circleindicator/build.gradle +++ b/circleindicator/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'com.android.library' version = "2.1.3" android { - compileSdkVersion 31 + compileSdkVersion 28 defaultConfig { minSdkVersion 14 - targetSdkVersion 31 + targetSdkVersion 28 versionCode 122 versionName version }