Skip to content

Commit 69049d8

Browse files
authored
Change the min SDK to 17 (#4)
* initial commit * Set min SDK to 17 * revert some file
1 parent d5190e8 commit 69049d8

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

.idea/gradle.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77
buildToolsVersion "29.0.2"
88
defaultConfig {
99
applicationId "com.broooapps.curvegraphview"
10-
minSdkVersion 21
10+
minSdkVersion 17
1111
targetSdkVersion 29
1212
versionCode 1
1313
versionName "1.0"
@@ -26,9 +26,9 @@ dependencies {
2626
implementation 'androidx.appcompat:appcompat:1.1.0'
2727
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
2828
testImplementation 'junit:junit:4.12'
29-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
3029
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
31-
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.50"
30+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
31+
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.71"
3232
implementation project(path: ':graphview')
3333
}
3434
repositories {

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ buildscript {
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.5.3'
12-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50"
11+
classpath 'com.android.tools.build:gradle:3.6.2'
12+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71"
1313

1414
// NOTE: Do not place your application dependencies here; they belong
1515
// in the individual module build.gradle files

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

graphview/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android-extensions'
32
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-android-extensions'
44

55
android {
66
compileSdkVersion 29
77
buildToolsVersion "29.0.2"
88

99

1010
defaultConfig {
11-
minSdkVersion 21
11+
minSdkVersion 17
1212
targetSdkVersion 29
1313
versionCode 1
1414
versionName "1.0"
@@ -33,8 +33,8 @@ dependencies {
3333
testImplementation 'junit:junit:4.12'
3434
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
3535
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
36-
compile "androidx.core:core-ktx:+"
37-
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.50"
36+
implementation "androidx.core:core-ktx:1.2.0"
37+
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.71"
3838
}
3939
repositories {
4040
mavenCentral()

graphview/src/main/java/com/broooapps/graphview/CurveGraphView.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import android.graphics.PathMeasure;
1515
import android.graphics.RectF;
1616
import android.graphics.Shader;
17+
import android.os.Build;
1718
import android.util.AttributeSet;
1819
import android.view.View;
1920
import android.view.animation.AccelerateDecelerateInterpolator;
@@ -188,7 +189,9 @@ public void setData(int span, int maxVal, final GraphData... graphDataArray) {
188189
ob.setDuration(animationDuration);
189190
ob.setInterpolator(new AccelerateInterpolator());
190191
ob.start();
191-
ob.setAutoCancel(true);
192+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
193+
ob.setAutoCancel(true);
194+
}
192195
ob.addListener(new Animator.AnimatorListener() {
193196
@Override
194197
public void onAnimationStart(Animator animation) {

0 commit comments

Comments
 (0)