From cc44c3ccba0a9864ac4e046ef3fedd9fde30b5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mion?= Date: Fri, 30 Nov 2018 16:35:32 +0000 Subject: [PATCH] Update master (#26) * Upgrade build gradle tools to 3.1.4 * Add badge position feature. (#18) * Feature/add text color attribute (#23) * Add badge text color attribute * Upgrade gradle build tools version to 3.2.1 * Fix usage of SavedState for API < 24 * Bump to version 1.2.0 --- build.gradle | 6 +++--- .../src/main/java/com/andremion/counterfab/CounterFab.java | 7 ++++++- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 41ccf48..36cee64 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' } } @@ -26,8 +26,8 @@ allprojects { minSdkVersion = 16 targetSdkVersion = 27 - versionCode = 5 - versionName = "1.1.1" + versionCode = 6 + versionName = "1.2.0" supportLibraryVersion = '27.1.1' diff --git a/counterfab/src/main/java/com/andremion/counterfab/CounterFab.java b/counterfab/src/main/java/com/andremion/counterfab/CounterFab.java index 6ec9daf..2a034d6 100644 --- a/counterfab/src/main/java/com/andremion/counterfab/CounterFab.java +++ b/counterfab/src/main/java/com/andremion/counterfab/CounterFab.java @@ -28,6 +28,7 @@ import android.graphics.Typeface; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Build.VERSION_CODES; import android.os.Parcel; import android.os.Parcelable; @@ -338,7 +339,11 @@ public String toString() { @Override public SavedState createFromParcel(Parcel in, ClassLoader loader) { - return new SavedState(in, loader); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + return new SavedState(in, loader); + } else { + return new SavedState(in); + } } @Override diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 24e7c39..c3510d6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip