Skip to content

Commit e3c408f

Browse files
committed
Updates
1 parent f1980bb commit e3c408f

4 files changed

Lines changed: 10 additions & 40 deletions

File tree

build.gradle

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
apply plugin: 'com.github.ben-manes.versions'
3-
42
buildscript {
53

64
repositories {
7-
jcenter()
5+
mavenCentral()
86
google()
97
}
108
dependencies {
11-
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0'
12-
classpath 'com.android.tools.build:gradle:4.2.0-beta01'
9+
classpath 'com.android.tools.build:gradle:7.1.0-rc01'
1310

1411
// NOTE: Do not place your application dependencies here; they belong
1512
// in the individual module build.gradle files
@@ -18,8 +15,8 @@ buildscript {
1815

1916
allprojects {
2017
repositories {
21-
jcenter()
18+
mavenCentral()
2219
maven { url 'https://jitpack.io' }
23-
google()
20+
google()
2421
}
2522
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

lib/build.gradle

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,16 @@ android {
99
defaultConfig {
1010
minSdkVersion 14
1111
targetSdkVersion 30
12-
versionName libVersion
1312
}
1413
compileOptions {
1514
sourceCompatibility JavaVersion.VERSION_1_8
1615
targetCompatibility JavaVersion.VERSION_1_8
1716
}
1817
}
1918

20-
// build a jar with source files
21-
task sourcesJar(type: Jar) {
22-
from android.sourceSets.main.java.srcDirs
23-
classifier = 'sources'
24-
}
25-
26-
task javadoc(type: Javadoc) {
27-
failOnError false
28-
source = android.sourceSets.main.java.sourceFiles
29-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
30-
classpath += configurations.compile
31-
}
32-
33-
// build a jar with javadoc
34-
task javadocJar(type: Jar, dependsOn: javadoc) {
35-
classifier = 'javadoc'
36-
from javadoc.destinationDir
37-
}
38-
39-
artifacts {
40-
archives sourcesJar
41-
archives javadocJar
42-
}
43-
4419
dependencies {
45-
implementation 'androidx.recyclerview:recyclerview:1.1.0'
46-
implementation 'com.google.android.material:material:1.2.1'
20+
implementation 'androidx.recyclerview:recyclerview:1.2.1'
21+
implementation 'com.google.android.material:material:1.4.0'
4722
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
4823
}
4924
repositories {

lib/src/main/java/com/turingtechnologies/materialscrollbar/MaterialScrollBar.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
306306
throw new RuntimeException("You need to set a recyclerView for the scroll bar, either in the XML or using setRecyclerView().");
307307
}
308308

309+
scrollUtils.scrollHandleAndIndicator();
310+
309311
if(!isInEditMode()) {
310312
scrollUtils.scrollHandleAndIndicator();
311313
if(hiddenByNotEnoughElements = (scrollUtils.getAvailableScrollHeight() <= 0)) {
@@ -810,11 +812,7 @@ public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
810812

811813
//Disables any swipeRefreshLayout parent if the recyclerview is not at the top and enables it if it is.
812814
if(swipeRefreshLayout != null && !swipeRefreshLayout.isRefreshing()) {
813-
if(((LinearLayoutManager)recyclerView.getLayoutManager()).findFirstCompletelyVisibleItemPosition() == 0) {
814-
swipeRefreshLayout.setEnabled(true);
815-
} else {
816-
swipeRefreshLayout.setEnabled(false);
817-
}
815+
swipeRefreshLayout.setEnabled(((LinearLayoutManager) recyclerView.getLayoutManager()).findFirstCompletelyVisibleItemPosition() == 0);
818816
}
819817
}
820818
}

0 commit comments

Comments
 (0)