Skip to content

Commit

Permalink
更新配置
Browse files Browse the repository at this point in the history
  • Loading branch information
403462630 committed May 17, 2021
1 parent f27121c commit b1aa93e
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 108 deletions.
15 changes: 8 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha07'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.android.material:material:1.3.0-alpha04'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation project(":library")
// implementation 'fc.nestedscrollview.androidx:library:1.0.0'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.49-androidx'
Expand Down
56 changes: 0 additions & 56 deletions bintray.gradle

This file was deleted.

17 changes: 8 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.4.30'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

allprojects {
repositories {
maven { url "https://jitpack.io" }
maven {
url "https://dl.bintray.com/403462630/maven"
}
// maven {
// url "https://dl.bintray.com/403462630/maven"
// }
google()
jcenter()
mavenCentral()
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
57 changes: 26 additions & 31 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

ext {
projectName = "AndroidXFCNestedScrollView"
}

apply from: "../bintray.gradle"

group="fc.nestedscrollview.androidx"
version="1.0.7"
group="com.github.403462630"

android {
compileSdkVersion 28
Expand All @@ -33,31 +27,32 @@ android {
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
options.encoding = "utf-8"
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
// archives javadocJar
archives sourcesJar
}
//task sourcesJar(type: Jar) {
// from android.sourceSets.main.java.srcDirs
// classifier = 'sources'
//}
//
//task javadoc(type: Javadoc) {
// options.encoding = "utf-8"
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
//}
//
//task javadocJar(type: Jar, dependsOn: javadoc) {
// classifier = 'javadoc'
// from javadoc.destinationDir
//}
//
//artifacts {
//// archives javadocJar
// archives sourcesJar
//}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'

compileOnly 'androidx.appcompat:appcompat:1.0.2'
compileOnly 'androidx.recyclerview:recyclerview:1.0.0'
compileOnly 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import java.lang.reflect.Field;
Expand Down Expand Up @@ -48,18 +50,37 @@ public void onNestedScrollAccepted(View child, View target, int axes) {
this.targetView = target;
}

@Override
public void onNestedPreScroll(View target, int dx, int dy, int[] consumed, int type) {
super.onNestedPreScroll(target, dx, dy, consumed, type);
}

@Override
public void onNestedScroll(@NonNull View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type, @NonNull int[] consumed) {
super.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type, consumed);
}

@Override
public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow) {
if (dy < 0 && isPullRefreshIntercept) {
return false;
return super.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow);
}

@Override
public void dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, @Nullable int[] offsetInWindow, int type, @NonNull int[] consumed) {
if (dyUnconsumed < 0 && !isRefreshing()) {
// return false;
} else {
return super.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow);
super.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, offsetInWindow, type, consumed);
}
}

@Override
public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow) {
return false;
if (dyUnconsumed < 0 && !isRefreshing()) {
return false;
} else {
return super.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, offsetInWindow);
}
}

@Override
Expand Down

0 comments on commit b1aa93e

Please sign in to comment.