diff --git a/app/src/main/java/app/akilesh/qacc/ui/fragments/ColorCustomisationFragment.kt b/app/src/main/java/app/akilesh/qacc/ui/fragments/ColorCustomisationFragment.kt index acc4085..6623a1f 100644 --- a/app/src/main/java/app/akilesh/qacc/ui/fragments/ColorCustomisationFragment.kt +++ b/app/src/main/java/app/akilesh/qacc/ui/fragments/ColorCustomisationFragment.kt @@ -173,19 +173,19 @@ class ColorCustomisationFragment: Fragment() { val hsl = FloatArray(3) ColorUtils.colorToHSL(colorLight, hsl) - binding.lightSliders.hue.setOnChangeListener { _, value -> + binding.lightSliders.hue.addOnChangeListener { _, value, _ -> hsl[0] = value newColor = ColorUtils.HSLToColor(hsl) model.lightAccent.value = toHex(newColor) } - binding.lightSliders.saturation.setOnChangeListener { _, value -> + binding.lightSliders.saturation.addOnChangeListener { _, value, _ -> hsl[1] = value newColor = ColorUtils.HSLToColor(hsl) model.lightAccent.value = toHex(newColor) } - binding.lightSliders.lightness.setOnChangeListener { _, value -> + binding.lightSliders.lightness.addOnChangeListener { _, value, _ -> hsl[2] = value newColor = ColorUtils.HSLToColor(hsl) model.lightAccent.value = toHex(newColor) @@ -198,19 +198,19 @@ class ColorCustomisationFragment: Fragment() { val hsl = FloatArray(3) ColorUtils.colorToHSL(colorDark, hsl) - binding.darkSliders.hue.setOnChangeListener { _, value -> + binding.darkSliders.hue.addOnChangeListener { _, value, _ -> hsl[0] = value newColor = ColorUtils.HSLToColor(hsl) model.darkAccent.value = toHex(newColor) } - binding.darkSliders.saturation.setOnChangeListener { _, value -> + binding.darkSliders.saturation.addOnChangeListener { _, value, _ -> hsl[1] = value newColor = ColorUtils.HSLToColor(hsl) model.darkAccent.value = toHex(newColor) } - binding.darkSliders.lightness.setOnChangeListener { _, value -> + binding.darkSliders.lightness.addOnChangeListener { _, value, _ -> hsl[2] = value newColor = ColorUtils.HSLToColor(hsl) model.darkAccent.value = toHex(newColor) diff --git a/app/src/main/res/layout/hsl_sliders.xml b/app/src/main/res/layout/hsl_sliders.xml index 8475871..ab5ec0a 100644 --- a/app/src/main/res/layout/hsl_sliders.xml +++ b/app/src/main/res/layout/hsl_sliders.xml @@ -1,12 +1,12 @@ + android:orientation="vertical" + > @@ -50,7 +49,6 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - app:floatingLabel="true" android:valueFrom="0" android:valueTo="1" /> @@ -73,7 +71,6 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - app:floatingLabel="true" android:valueFrom="0" android:valueTo="1" /> diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 1276fdc..ff05c7b 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -37,7 +37,7 @@ object Libraries { const val lifecycle = "2.2.0-rc03" const val coroutines = "1.3.3" const val fragment = "1.2.0-rc05" - const val material = "1.2.0-alpha03" + const val material = "1.2.0-alpha04" const val libSu = "2.5.1" const val chroma = "1.2.6" const val bouncycastle = "1.63"