diff --git a/.gitignore b/.gitignore
index c6cbe56..47e9145 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.idea
*.iml
.gradle
/local.properties
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index 96cc43e..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index e7bedf3..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 97626ba..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 656f5d4..fa789f1 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,15 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -24,26 +94,10 @@
-
+
-
-
-
-
- Android API 15 Platform
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index cd5c3ad..a2f6bcc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
+ google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
+ classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
@@ -16,5 +17,6 @@ buildscript {
allprojects {
repositories {
jcenter()
+ google()
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 50e05ac..1923d51 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Jul 19 11:30:51 EET 2017
+#Sun Aug 12 17:15:54 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
diff --git a/library/build.gradle b/library/build.gradle
index 64bde14..1427f0c 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -4,12 +4,10 @@ apply plugin: 'com.github.dcendents.android-maven'
group = 'com.github.ceryle'
android {
- compileSdkVersion 25
- buildToolsVersion "25.0.2"
-
+ compileSdkVersion 28
defaultConfig {
- minSdkVersion 11
- targetSdkVersion 25
+ minSdkVersion 18
+ targetSdkVersion 28
versionCode 1
versionName "1.0"
}
@@ -45,7 +43,7 @@ artifacts {
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- testCompile 'junit:junit:4.12'
- compile 'com.android.support:appcompat-v7:25.3.1'
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ testImplementation 'junit:junit:4.12'
+ implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
}
diff --git a/library/src/main/java/co/ceryle/radiorealbutton/RoundedCornerLayout.java b/library/src/main/java/co/ceryle/radiorealbutton/RoundedCornerLayout.java
index fa308bd..8564e7c 100644
--- a/library/src/main/java/co/ceryle/radiorealbutton/RoundedCornerLayout.java
+++ b/library/src/main/java/co/ceryle/radiorealbutton/RoundedCornerLayout.java
@@ -77,8 +77,12 @@ protected void dispatchDraw(Canvas canvas) {
final Path path = new Path();
path.addRoundRect(new RectF(0, 0, canvas.getWidth(), canvas.getHeight()), cornerRadius, cornerRadius, Path.Direction.CW);
- canvas.clipPath(path, Region.Op.REPLACE);
- canvas.clipPath(path);
+ // https://developer.android.com/reference/android/graphics/Canvas#clipPath(android.graphics.Path,%20android.graphics.Region.Op)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
+ canvas.clipPath(path, Region.Op.INTERSECT);
+ } else {
+ canvas.clipPath(path, Region.Op.REPLACE);
+ }
super.dispatchDraw(canvas);
diff --git a/sample/build.gradle b/sample/build.gradle
index 2d4250b..8ea6b6d 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -1,13 +1,11 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 25
- buildToolsVersion "25.0.2"
-
+ compileSdkVersion 28
defaultConfig {
applicationId "co.ceryle.radiorealbutton.sample"
- minSdkVersion 11
- targetSdkVersion 25
+ minSdkVersion 18
+ targetSdkVersion 28
versionCode 1
versionName "1.0"
}
@@ -20,9 +18,8 @@ android {
}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- testCompile 'junit:junit:4.12'
- compile 'com.android.support:appcompat-v7:25.3.1'
-
- compile project(":library")
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ testImplementation 'junit:junit:4.12'
+ implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
+ implementation project(":library")
}