From 788cec5455721894acd55ef6225d4ab4641e9e24 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 22 Sep 2019 22:35:34 -0700 Subject: Use and with inverse --- core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt index 20abe8a..206626e 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt @@ -126,7 +126,7 @@ inline var Activity.navigationBarColor: Int } var prevSystemUiVisibility = window.decorView.systemUiVisibility prevSystemUiVisibility = if (value.isColorDark) { - prevSystemUiVisibility xor View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + prevSystemUiVisibility and View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv() } else { prevSystemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR } @@ -147,7 +147,7 @@ inline var Activity.statusBarColor: Int } var prevSystemUiVisibility = window.decorView.systemUiVisibility prevSystemUiVisibility = if (value.isColorDark) { - prevSystemUiVisibility xor View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR + prevSystemUiVisibility and View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() } else { prevSystemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR } -- cgit v1.2.3