From 07e0ae884c37609da71003357d56eb653d5276b8 Mon Sep 17 00:00:00 2001 From: Zakhar Timoshenko Date: Sun, 12 Sep 2021 17:41:36 +0300 Subject: [PATCH] Fix color when search opened with AMOLED mode --- app/src/main/java/org/koitharu/kotatsu/main/ui/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/koitharu/kotatsu/main/ui/MainActivity.kt b/app/src/main/java/org/koitharu/kotatsu/main/ui/MainActivity.kt index 6a2354598..b0a54747f 100644 --- a/app/src/main/java/org/koitharu/kotatsu/main/ui/MainActivity.kt +++ b/app/src/main/java/org/koitharu/kotatsu/main/ui/MainActivity.kt @@ -345,7 +345,7 @@ class MainActivity : BaseActivity(), binding.drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED) drawerToggle.isDrawerIndicatorEnabled = false // Avoiding shadows on the sides if the color is transparent, so we make the AppBarLayout white/grey/black - if (get().isAmoledTheme) { + if (get().isAmoledTheme && get().theme == AppCompatDelegate.MODE_NIGHT_YES) { binding.toolbar.setBackgroundColor(Color.BLACK) } else { binding.appbar.setBackgroundColor(ContextCompat.getColor(this, R.color.color_surface))