From 48e39862647b161cb1a037de991403fa90230001 Mon Sep 17 00:00:00 2001 From: Matt Portune <59324545+mportune-bw@users.noreply.github.com> Date: Fri, 15 Oct 2021 15:46:24 -0400 Subject: [PATCH] fix gap in theme application resulting in flashing during transitions (#1588) --- src/Android/MainActivity.cs | 1 + src/Android/Utilities/ThemeHelpers.cs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/Android/MainActivity.cs b/src/Android/MainActivity.cs index 7d2023606..7eb7d83dc 100644 --- a/src/Android/MainActivity.cs +++ b/src/Android/MainActivity.cs @@ -385,6 +385,7 @@ namespace Bit.Droid private void AppearanceAdjustments() { Window?.SetStatusBarColor(ThemeHelpers.NavBarBackgroundColor); + Window?.DecorView.SetBackgroundColor(ThemeHelpers.BackgroundColor); ThemeHelpers.SetAppearance(ThemeManager.GetTheme(true), ThemeManager.OsDarkModeEnabled()); } diff --git a/src/Android/Utilities/ThemeHelpers.cs b/src/Android/Utilities/ThemeHelpers.cs index 3dfac9efa..017985b71 100644 --- a/src/Android/Utilities/ThemeHelpers.cs +++ b/src/Android/Utilities/ThemeHelpers.cs @@ -16,6 +16,10 @@ namespace Bit.Droid.Utilities { get => ThemeManager.GetResourceColor("MutedColor").ToAndroid(); } + public static Color BackgroundColor + { + get => ThemeManager.GetResourceColor("BackgroundColor").ToAndroid(); + } public static Color NavBarBackgroundColor { get => ThemeManager.GetResourceColor("NavigationBarBackgroundColor").ToAndroid();