mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[android] Fix theme not apply correctly
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
jeanbaptisteC
parent
b929823f6b
commit
85462161b2
@@ -90,8 +90,7 @@ public enum ThemeSwitcher
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_YES);
|
||||
else
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
|
||||
if (RoutingController.get().isVehicleNavigation())
|
||||
style = MapStyle.VehicleDark;
|
||||
@@ -104,8 +103,7 @@ public enum ThemeSwitcher
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_NO);
|
||||
else
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
|
||||
if (RoutingController.get().isVehicleNavigation())
|
||||
style = MapStyle.VehicleClear;
|
||||
|
||||
Reference in New Issue
Block a user