Skip to content

Commit 76f88b2

Browse files
authored
Merge pull request #10 from javichaques/master
Migrate to Android X, support color customization
2 parents 0c2450d + 47d6ad3 commit 76f88b2

File tree

17 files changed

+448
-412
lines changed

17 files changed

+448
-412
lines changed

build.gradle

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
31
buildscript {
42
repositories {
3+
google()
54
jcenter()
65
}
76
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.3'
9-
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
7+
classpath 'com.android.tools.build:gradle:3.2.1'
128
}
139
}
1410

15-
ext {
16-
supportLibraryVersion = '26.1.0'
17-
}
18-
1911
allprojects {
2012
repositories {
13+
google()
2114
jcenter()
22-
maven { url "https://maven.google.com" }
2315
}
2416
}
2517

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Specifies the JVM arguments used for the daemon process.
1111
# The setting is particularly useful for tweaking memory settings.
12+
android.enableJetifier=true
13+
android.useAndroidX=true
1214
org.gradle.jvmargs=-Xmx1536m
1315

1416
# When configured, Gradle will run in incubating parallel mode.

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-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

library/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ ext {
99
}
1010

1111
android {
12-
compileSdkVersion 26
13-
buildToolsVersion "26.0.1"
12+
compileSdkVersion 28
1413

1514
defaultConfig {
16-
minSdkVersion 16
17-
targetSdkVersion 26
15+
minSdkVersion 19
16+
targetSdkVersion 28
1817
versionCode 1
1918
versionName "1.0"
2019
}
@@ -27,12 +26,12 @@ android {
2726
}
2827

2928
dependencies {
30-
compile fileTree(dir: 'libs', include: ['*.jar'])
29+
implementation fileTree(dir: 'libs', include: ['*.jar'])
3130

32-
compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
33-
compile "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
31+
implementation "androidx.appcompat:appcompat:1.0.0"
32+
implementation "androidx.recyclerview:recyclerview:1.0.0"
3433

35-
compile "com.andkulikov:transitionseverywhere:1.7.6"
34+
implementation "com.andkulikov:transitionseverywhere:1.8.0"
3635
}
3736

3837
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
package cz.intik.overflowindicator;
22

3-
import android.support.v7.widget.RecyclerView;
3+
import androidx.recyclerview.widget.RecyclerView;
44

55
/**
66
* Data observer which notifies {@link OverflowPagerIndicator} of changed data
77
*
88
* @author Petr Introvic <[email protected]>
9-
* created 03.10.2017.
9+
* created 03.10.2017.
1010
*/
1111

1212
class OverflowDataObserver extends RecyclerView.AdapterDataObserver {
1313

14-
private OverflowPagerIndicator mOverflowPagerIndicator;
15-
16-
OverflowDataObserver(OverflowPagerIndicator overflowPagerIndicator) {
17-
mOverflowPagerIndicator = overflowPagerIndicator;
18-
}
19-
20-
@Override
21-
public void onChanged() {
22-
mOverflowPagerIndicator.updateIndicatorsCount();
23-
}
24-
25-
@Override
26-
public void onItemRangeInserted(int positionStart, int itemCount) {
27-
mOverflowPagerIndicator.updateIndicatorsCount();
28-
}
29-
30-
@Override
31-
public void onItemRangeChanged(int positionStart, int itemCount) {
32-
mOverflowPagerIndicator.updateIndicatorsCount();
33-
}
34-
35-
@Override
36-
public void onItemRangeChanged(int positionStart, int itemCount, Object payload) {
37-
mOverflowPagerIndicator.updateIndicatorsCount();
38-
}
39-
40-
@Override
41-
public void onItemRangeRemoved(int positionStart, int itemCount) {
42-
mOverflowPagerIndicator.updateIndicatorsCount();
43-
}
44-
45-
@Override
46-
public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {
47-
mOverflowPagerIndicator.updateIndicatorsCount();
48-
}
14+
private OverflowPagerIndicator mOverflowPagerIndicator;
15+
16+
OverflowDataObserver(OverflowPagerIndicator overflowPagerIndicator) {
17+
mOverflowPagerIndicator = overflowPagerIndicator;
18+
}
19+
20+
@Override
21+
public void onChanged() {
22+
mOverflowPagerIndicator.updateIndicatorsCount();
23+
}
24+
25+
@Override
26+
public void onItemRangeInserted(int positionStart, int itemCount) {
27+
mOverflowPagerIndicator.updateIndicatorsCount();
28+
}
29+
30+
@Override
31+
public void onItemRangeChanged(int positionStart, int itemCount) {
32+
mOverflowPagerIndicator.updateIndicatorsCount();
33+
}
34+
35+
@Override
36+
public void onItemRangeChanged(int positionStart, int itemCount, Object payload) {
37+
mOverflowPagerIndicator.updateIndicatorsCount();
38+
}
39+
40+
@Override
41+
public void onItemRangeRemoved(int positionStart, int itemCount) {
42+
mOverflowPagerIndicator.updateIndicatorsCount();
43+
}
44+
45+
@Override
46+
public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {
47+
mOverflowPagerIndicator.updateIndicatorsCount();
48+
}
4949
}

0 commit comments

Comments
 (0)