From 18c82908fc8f6f7d529cb9ae54a580a621494eaa Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Tue, 8 Sep 2020 10:47:36 +0300 Subject: [PATCH] Check system night mode for status bar color --- OsmAnd/src/net/osmand/SecondSplashScreenFragment.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java b/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java index cd837b20cd..72618ace8a 100644 --- a/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java +++ b/OsmAnd/src/net/osmand/SecondSplashScreenFragment.java @@ -34,6 +34,8 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment { public static boolean SHOW = true; public static boolean VISIBLE = false; + private boolean systemDefaultNightMode; + public MapActivity getMapActivity() { return (MapActivity) getActivity(); } @@ -77,7 +79,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment { OsmandApplication app = requireMyApplication(); FragmentActivity activity = requireActivity(); UiUtilities iconsCache = app.getUIUtilities(); - boolean systemDefaultNightMode = app.getSettings().isSupportSystemDefaultTheme() && + systemDefaultNightMode = app.getSettings().isSupportSystemDefaultTheme() && !app.getSettings().isLightSystemDefaultTheme(); RelativeLayout view = new RelativeLayout(activity); @@ -184,6 +186,8 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment { @Override public int getStatusBarColorId() { - return R.color.status_bar_color_dark; + return systemDefaultNightMode ? + R.color.status_bar_color_dark : + R.color.status_bar_transparent_light; } }