aboutsummaryrefslogtreecommitdiff
path: root/colorpicker
diff options
context:
space:
mode:
authorJahir Fiquitiva <jahir.fiquitiva@gmail.com>2017-07-10 01:22:52 -0500
committerAllan Wang <me@allanwang.ca>2017-07-09 23:22:52 -0700
commit3028d35c24da883dad34dbc4f6eb36d1df1838fa (patch)
tree3bf16d3f0e98c570731469a6969cc73b403efc3c /colorpicker
parentf1660aab8a25c93aebdb7993e4bfbc3bb7e65ee5 (diff)
downloadkau-3028d35c24da883dad34dbc4f6eb36d1df1838fa.tar.gz
kau-3028d35c24da883dad34dbc4f6eb36d1df1838fa.tar.bz2
kau-3028d35c24da883dad34dbc4f6eb36d1df1838fa.zip
Added some extensions (#4)
* Add a couple extra extensions. * Add more extensions * Make oneline fun * Remove duplicated line from modules.xml * Revert kprefsingle and fix minor docs (cherry picked from commit 76d0de9) * Clean up ColorUtils * Clean up ActivityUtils * Clean up DrawableUtils * Remove MenuUtils * Clean PackageUtils * Clean up ViewUtils * Clean up ViewUtils 2
Diffstat (limited to 'colorpicker')
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt6
1 files changed, 3 insertions, 3 deletions
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 04345a1..e9da763 100644
--- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
@@ -133,7 +133,7 @@ internal class ColorPickerView @JvmOverloads constructor(
}
customColorIndicator.setBackgroundColor(selectedColor)
- if (alphaSeekbar.isVisible()) {
+ if (alphaSeekbar.isVisible) {
val alpha = Color.alpha(selectedColor)
alphaSeekbar.progress = alpha
alphaValue.text = String.format(Locale.CANADA, "%d", alpha)
@@ -178,9 +178,9 @@ internal class ColorPickerView @JvmOverloads constructor(
redSeekbar.setOnSeekBarChangeListener(customRgbListener)
greenSeekbar.setOnSeekBarChangeListener(customRgbListener)
blueSeekbar.setOnSeekBarChangeListener(customRgbListener)
- if (alphaSeekbar.isVisible())
+ if (alphaSeekbar.isVisible)
alphaSeekbar.setOnSeekBarChangeListener(customRgbListener)
- hexInput.setText(selectedColor.toHexString(alphaSeekbar.isVisible(), false))
+ hexInput.setText(selectedColor.toHexString(alphaSeekbar.isVisible, false))
gridView.fadeOut(onFinish = { gridView.gone() })
customFrame.fadeIn()
} else {