diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-22 19:43:10 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-22 19:43:10 -0700 |
commit | ff17cd5daac40418e6e1bc89e9f65bd0fc8ea6af (patch) | |
tree | 02391363e8f2af64820f4b231cb9aaab030e56f2 /sample/src/main/kotlin/ca | |
parent | 971738ae5942c3439568c54393708a3dd63c87f6 (diff) | |
download | kau-ff17cd5daac40418e6e1bc89e9f65bd0fc8ea6af.tar.gz kau-ff17cd5daac40418e6e1bc89e9f65bd0fc8ea6af.tar.bz2 kau-ff17cd5daac40418e6e1bc89e9f65bd0fc8ea6af.zip |
Change lighten and darken again
Diffstat (limited to 'sample/src/main/kotlin/ca')
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 10 |
1 files changed, 4 insertions, 6 deletions
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 { |