From ff17cd5daac40418e6e1bc89e9f65bd0fc8ea6af Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 22 Jun 2017 19:43:10 -0700 Subject: Change lighten and darken again --- sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sample/src/main/kotlin/ca/allanwang') diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt index 849b49a..bb1fcff 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -57,9 +57,8 @@ class MainActivity : KPrefActivity() { colorPicker(R.string.accent_color, { KPrefSample.accentColor }, { KPrefSample.accentColor = it reload() - val darkerColor = it.darken() - this@MainActivity.navigationBarColor = darkerColor - toolbarCanvas.ripple(darkerColor, RippleCanvas.MIDDLE, RippleCanvas.END, duration = 500L) + this@MainActivity.navigationBarColor = it + toolbarCanvas.ripple(it, RippleCanvas.MIDDLE, RippleCanvas.END, duration = 500L) }) { descRes = R.string.color_no_custom allowCustom = false @@ -118,9 +117,8 @@ class MainActivity : KPrefActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) bgCanvas.set(KPrefSample.bgColor) - val darkAccent = KPrefSample.accentColor.darken() - toolbarCanvas.set(darkAccent) - this.navigationBarColor = darkAccent + toolbarCanvas.set(KPrefSample.accentColor) + this.navigationBarColor = KPrefSample.accentColor } override fun onCreateOptionsMenu(menu: Menu): Boolean { -- cgit v1.2.3