From c2bab110d6cfc1ad4fb0d6207c7de514a28ae1d5 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 3 May 2020 13:01:51 -0400 Subject: [PATCH] Fixed translucent 2/3 button nav bar on android 10 --- .../eu/kanade/tachiyomi/ui/reader/ReaderChapterSheet.kt | 6 ++++-- app/src/main/res/values/themes.xml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterSheet.kt index cc7ff3617d..90bf64365a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderChapterSheet.kt @@ -73,8 +73,10 @@ class ReaderChapterSheet @JvmOverloads constructor(context: Context, attrs: Attr backgroundTintList = ColorStateList.valueOf(lerpColor(primary, fullPrimary, trueProgress)) chapter_recycler.alpha = trueProgress - if (activity.sheetManageNavColor) activity.window.navigationBarColor = - lerpColor(ColorUtils.setAlphaComponent(primary, 0), primary, trueProgress) + if (activity.sheetManageNavColor && progress > 0f) { + activity.window.navigationBarColor = + lerpColor(ColorUtils.setAlphaComponent(primary, 0), primary, trueProgress) + } } override fun onStateChanged(p0: View, state: Int) { diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index a4cc42f6e1..fc1bfdeb63 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -8,6 +8,7 @@