aboutsummaryrefslogtreecommitdiff
path: root/colorpicker
diff options
context:
space:
mode:
Diffstat (limited to 'colorpicker')
-rw-r--r--colorpicker/build.gradle46
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt1
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt3
3 files changed, 5 insertions, 45 deletions
diff --git a/colorpicker/build.gradle b/colorpicker/build.gradle
index 1833119..5972ea3 100644
--- a/colorpicker/build.gradle
+++ b/colorpicker/build.gradle
@@ -1,45 +1,7 @@
-plugins {
- id 'com.gladed.androidgitversion' version '0.3.4'
-}
-
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-apply plugin: 'com.github.dcendents.android-maven'
-
-group = project.APP_GROUP
+apply from: '../android.gradle'
android {
- compileSdkVersion Integer.parseInt(project.TARGET_SDK)
- buildToolsVersion project.BUILD_TOOLS
-
- androidGitVersion {
- codeFormat = 'MMNNPPBB'
- prefix 'v'
- }
-
- defaultConfig {
- minSdkVersion Integer.parseInt(project.MIN_SDK)
- targetSdkVersion Integer.parseInt(project.TARGET_SDK)
- versionCode androidGitVersion.code()
- versionName androidGitVersion.name()
- consumerProguardFiles 'progress-proguard.txt'
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- lintOptions {
- abortOnError false
- checkReleaseBuilds false
- }
- resourcePrefix "kau_color"
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- test.java.srcDirs += 'src/test/kotlin'
- }
+ resourcePrefix "kau_color_"
}
dependencies {
@@ -50,8 +12,8 @@ dependencies {
testCompile 'junit:junit:4.12'
compile project(':core')
- compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+ compile "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:${KOTLIN}"
compile "com.afollestad.material-dialogs:commons:${MATERIAL_DIALOG}"
}
diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt
index 6d23ade..e987c2c 100644
--- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt
@@ -4,7 +4,6 @@ import android.content.Context
import android.graphics.Color
import android.support.annotation.DimenRes
import android.support.annotation.StringRes
-import ca.allanwang.kau.R
import ca.allanwang.kau.utils.string
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.Theme
diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
index 6565585..04345a1 100644
--- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
@@ -11,7 +11,6 @@ import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import android.widget.*
-import ca.allanwang.kau.R
import ca.allanwang.kau.utils.*
import com.afollestad.materialdialogs.DialogAction
import com.afollestad.materialdialogs.MaterialDialog
@@ -29,7 +28,7 @@ internal class ColorPickerView @JvmOverloads constructor(
var selectedColor: Int = -1
var isInSub: Boolean = false
var isInCustom: Boolean = false
- var circleSize: Int = context.dimen(R.dimen.kau_cp_circle_size).toInt()
+ var circleSize: Int = context.dimen(R.dimen.kau_color_circle_size).toInt()
val backgroundColor = context.resolveColor(R.attr.md_background_color,
if (context.resolveColor(android.R.attr.textColorPrimary).isColorDark) Color.WHITE else 0xff424242.toInt())
val backgroundColorTint = backgroundColor.colorToForeground()