diff --git a/.idea/gradle.xml b/.idea/gradle.xml index d274ab0..ce0162b 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -7,6 +7,7 @@ + diff --git a/.idea/misc.xml b/.idea/misc.xml index 773fe0f..0ad17cb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,7 @@ + - + diff --git a/app/build.gradle b/app/build.gradle index cad0d40..f2c5c6d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,9 +37,9 @@ android { dependencies { implementation project(path: ':stateLayout') - implementation 'androidx.core:core-ktx:1.10.1' - implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' - implementation 'com.google.android.material:material:1.11.0-alpha01' - implementation 'androidx.constraintlayout:constraintlayout:2.2.0-alpha10' - implementation 'com.airbnb.android:lottie:6.0.0' + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' + implementation 'com.google.android.material:material:1.11.0-alpha03' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.airbnb.android:lottie:6.1.0' } \ No newline at end of file diff --git a/build.gradle b/build.gradle index eff6d42..52232ff 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.0.2' apply false - id 'com.android.library' version '8.0.2' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false id 'org.jetbrains.kotlin.android' version '1.8.20' apply false } ext{ - VERSION_NAME = '1.0.3' + VERSION_NAME = '1.0.4' } \ No newline at end of file diff --git a/publish.gradle b/publish.gradle index 38f5019..2321ca7 100644 --- a/publish.gradle +++ b/publish.gradle @@ -35,7 +35,7 @@ afterEvaluate { publications { release(MavenPublication) { //添加这个,否则aar文件不上传 - artifact(tasks.getByName("bundleReleaseAar")) + artifact(tasks.named("bundleReleaseAar")) artifact(androidJavadocsJar) artifact(androidSourcesJar) groupId = GROUP_ID // 唯一标识(通常为模块包名,也可以任意) @@ -91,20 +91,20 @@ afterEvaluate { } //生成文档注释 -task androidJavadocs(type: Javadoc) { +tasks.register('androidJavadocs', Javadoc) { //设置源码所在的位置 source = android.sourceSets.main.java.srcDirs } //将文档打包成jar,生成javadoc.jar -task androidJavadocsJar(type: Jar) { +tasks.register('androidJavadocsJar', Jar) { // 指定文档名称 archiveClassifier.set('javadoc') from androidJavadocs.destinationDir } //将源码打包,生成sources.jar -task androidSourcesJar(type: Jar) { +tasks.register('androidSourcesJar', Jar) { archiveClassifier.set('sources') from android.sourceSets.main.java.srcDirs } diff --git a/stateLayout/build.gradle b/stateLayout/build.gradle index 741257e..a17f25b 100644 --- a/stateLayout/build.gradle +++ b/stateLayout/build.gradle @@ -30,9 +30,10 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.10.1' - implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' - implementation 'com.google.android.material:material:1.11.0-alpha01' + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' + implementation 'com.google.android.material:material:1.11.0-alpha03' + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01' } ext { diff --git a/stateLayout/src/main/java/com/chooongg/widget/stateLayout/StateLayout.kt b/stateLayout/src/main/java/com/chooongg/widget/stateLayout/StateLayout.kt index a69b03f..c065af9 100644 --- a/stateLayout/src/main/java/com/chooongg/widget/stateLayout/StateLayout.kt +++ b/stateLayout/src/main/java/com/chooongg/widget/stateLayout/StateLayout.kt @@ -581,13 +581,17 @@ open class StateLayout @JvmOverloads constructor( override fun dispatchNestedPreFling(velocityX: Float, velocityY: Float) = childHelper.dispatchNestedPreFling(velocityX, velocityY) + override fun getNestedScrollAxes(): Int { + return parentHelper.nestedScrollAxes + } + override fun onStartNestedScroll(child: View, target: View, axes: Int, type: Int): Boolean { - childHelper.startNestedScroll(axes, type) return true } override fun onNestedScrollAccepted(child: View, target: View, axes: Int, type: Int) { parentHelper.onNestedScrollAccepted(child, target, axes, type) + childHelper.startNestedScroll(axes, type) } override fun onStopNestedScroll(target: View, type: Int) {