forked from upstream-mirrors/OpenTracks
Themes: use separate themes for DayNight/OLED/DynamicColors.
Fixes #2123.
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="OpenTracksTheme" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/opentracks</item>
|
||||
<item name="colorSecondary">@color/opentracks</item>
|
||||
|
||||
<style name="DayNightDynamicTheme" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Material3 https://github.com/material-components/material-components-android/issues/2828#issuecomment-1187563903 -->
|
||||
<item name="switchPreferenceCompatStyle">@style/MaterialSwitchPreferenceCompat</item>
|
||||
|
||||
@@ -26,19 +23,12 @@
|
||||
<item name="actionBarSize">88dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SplashTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_logo_color_108dp</item>
|
||||
<item name="postSplashScreenTheme">@style/OpenTracksTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.OpenTracks.BottomAppBar" parent="Widget.Material3.BottomAppBar">
|
||||
<item name="backgroundTint">?attr/colorSurfaceContainer</item>
|
||||
</style>
|
||||
|
||||
<style name="OpenTracksThemeOled" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<style name="DayNightColorTheme" parent="DayNightDynamicTheme">
|
||||
<item name="colorPrimary">@color/opentracks</item>
|
||||
<item name="colorSecondary">@color/opentracks</item>
|
||||
</style>
|
||||
|
||||
<style name="NightOledDynamicTheme" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<!-- Material3 https://github.com/material-components/material-components-android/issues/2828#issuecomment-1187563903 -->
|
||||
<item name="switchPreferenceCompatStyle">@style/MaterialSwitchPreferenceCompat</item>
|
||||
|
||||
@@ -54,16 +44,41 @@
|
||||
<!-- Differences to OpenTracksTheme -->
|
||||
<item name="bottomAppBarStyle">@style/Widget.OpenTracks.BottomAppBarOled</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
<item name="android:statusBarColor">@color/oled_friendly</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="android:navigationBarColor">@android:color/black</item>
|
||||
<item name="android:navigationBarColor">@color/oled_friendly</item>
|
||||
|
||||
<item name="colorSurface">@android:color/black</item>
|
||||
<item name="colorSurfaceContainer">@android:color/black</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="colorSurface">@color/oled_friendly</item>
|
||||
<item name="colorSurfaceContainer">@color/oled_friendly</item>
|
||||
<item name="colorSurfaceDim">@color/oled_friendly</item>
|
||||
<item name="backgroundColor">@color/oled_friendly</item>
|
||||
<item name="android:windowBackground">@color/oled_friendly</item>
|
||||
|
||||
<!-- Material3-related: otherwise the actionbar does not overlay the SearchBar completely (with AppBarLayout) -->
|
||||
<item name="actionBarSize">88dp</item>
|
||||
</style>
|
||||
|
||||
<style name="NightOledColorTheme" parent="NightOledDynamicTheme">
|
||||
<item name="colorPrimary">@color/opentracks</item>
|
||||
<item name="colorSecondary">@color/opentracks</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.OpenTracks.BottomAppBarOled" parent="Widget.Material3.BottomAppBar">
|
||||
<item name="backgroundTint">@android:color/transparent</item>
|
||||
<item name="backgroundTint">@color/oled_friendly</item>
|
||||
</style>
|
||||
|
||||
<style name="SplashTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/splashscreen_background</item>
|
||||
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_logo_color_108dp</item>
|
||||
<item name="postSplashScreenTheme">@style/DayNightColorTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.OpenTracks.BottomAppBar" parent="Widget.Material3.BottomAppBar">
|
||||
<item name="materialThemeOverlay">@style/ThemeOverlay.OpenTracks.BottomAppBar</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeOverlay.OpenTracks.BottomAppBar" parent="">
|
||||
<item name="colorPrimary">@color/oled_friendly</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user