Skip to content
This repository was archived by the owner on Mar 27, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.iml
.gradle
/local.properties
Expand Down
22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

94 changes: 74 additions & 20 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,5 +17,6 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
14 changes: 6 additions & 8 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
17 changes: 7 additions & 10 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
Expand All @@ -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")
}