Check system night mode for status bar color

This commit is contained in:
Nazar-Kutz 2020-09-08 10:47:36 +03:00
parent ccd5f45da1
commit 18c82908fc

View file

@ -34,6 +34,8 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
public static boolean SHOW = true; public static boolean SHOW = true;
public static boolean VISIBLE = false; public static boolean VISIBLE = false;
private boolean systemDefaultNightMode;
public MapActivity getMapActivity() { public MapActivity getMapActivity() {
return (MapActivity) getActivity(); return (MapActivity) getActivity();
} }
@ -77,7 +79,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
OsmandApplication app = requireMyApplication(); OsmandApplication app = requireMyApplication();
FragmentActivity activity = requireActivity(); FragmentActivity activity = requireActivity();
UiUtilities iconsCache = app.getUIUtilities(); UiUtilities iconsCache = app.getUIUtilities();
boolean systemDefaultNightMode = app.getSettings().isSupportSystemDefaultTheme() && systemDefaultNightMode = app.getSettings().isSupportSystemDefaultTheme() &&
!app.getSettings().isLightSystemDefaultTheme(); !app.getSettings().isLightSystemDefaultTheme();
RelativeLayout view = new RelativeLayout(activity); RelativeLayout view = new RelativeLayout(activity);
@ -184,6 +186,8 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
@Override @Override
public int getStatusBarColorId() { public int getStatusBarColorId() {
return R.color.status_bar_color_dark; return systemDefaultNightMode ?
R.color.status_bar_color_dark :
R.color.status_bar_transparent_light;
} }
} }