diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..15a15b2 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 2996d53..f896943 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,13 +1,20 @@ + diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..2be040e --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index af731e1..7ac4eb6 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,9 @@ + + + + @@ -9,7 +13,7 @@ - + diff --git a/app/build.gradle b/app/build.gradle index bb69a52..a3d5d99 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { versionCode 1 versionName "1.0" multiDexEnabled true - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -21,10 +21,10 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:22.2.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' implementation project(':headZoomLayout') } diff --git a/app/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java index dad114d..f10a654 100644 --- a/app/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.hyc.headzoomlayout; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/src/main/java/com/hyc/headzoomlayout/MainActivity.java b/app/src/main/java/com/hyc/headzoomlayout/MainActivity.java index 0e912bd..5b3c4d8 100644 --- a/app/src/main/java/com/hyc/headzoomlayout/MainActivity.java +++ b/app/src/main/java/com/hyc/headzoomlayout/MainActivity.java @@ -3,8 +3,8 @@ import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.view.View; public class MainActivity extends AppCompatActivity { diff --git a/gradle.properties b/gradle.properties index 82618ce..d546dea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,8 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/headZoomLayout/build.gradle b/headZoomLayout/build.gradle index 72e34b7..bb2ef24 100644 --- a/headZoomLayout/build.gradle +++ b/headZoomLayout/build.gradle @@ -11,7 +11,7 @@ android { versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { @@ -24,8 +24,8 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:22.2.1' + implementation 'androidx.appcompat:appcompat:1.0.0' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' } diff --git a/headZoomLayout/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java b/headZoomLayout/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java index abdc3c6..895f5ba 100644 --- a/headZoomLayout/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java +++ b/headZoomLayout/src/androidTest/java/com/hyc/headzoomlayout/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.hyc.headzoomlayout; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/headZoomLayout/src/main/java/com/hyc/headzoomlayout/HeadZoomLayout.java b/headZoomLayout/src/main/java/com/hyc/headzoomlayout/HeadZoomLayout.java index 461aaa6..2649382 100644 --- a/headZoomLayout/src/main/java/com/hyc/headzoomlayout/HeadZoomLayout.java +++ b/headZoomLayout/src/main/java/com/hyc/headzoomlayout/HeadZoomLayout.java @@ -5,12 +5,12 @@ import android.content.Context; import android.content.res.TypedArray; import android.os.Build; -import android.support.annotation.IdRes; -import android.support.v4.view.NestedScrollingChild; -import android.support.v4.view.NestedScrollingChildHelper; -import android.support.v4.view.NestedScrollingParent; -import android.support.v4.view.NestedScrollingParentHelper; -import android.support.v4.view.ViewCompat; +import androidx.annotation.IdRes; +import androidx.core.view.NestedScrollingChild; +import androidx.core.view.NestedScrollingChildHelper; +import androidx.core.view.NestedScrollingParent; +import androidx.core.view.NestedScrollingParentHelper; +import androidx.core.view.ViewCompat; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View;