Android: Match navigation bar color to background

This commit is contained in:
Charles Lombardo 2022-09-10 15:54:58 -04:00
parent 84507ec420
commit bb398c8648
4 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="lightStatusBar">false</bool>
<bool name="lightSystemBars">false</bool>
</resources>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.V27.Dolphin" parent="Theme.Dolphin">
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar">@bool/lightSystemBars</item>
</style>
<style name="Theme.Dolphin.Main" parent="Theme.V27.Dolphin" />
</resources>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="lightStatusBar">true</bool>
<bool name="lightSystemBars">true</bool>
</resources>

View File

@ -13,7 +13,7 @@
</style>
<!-- Base theme -->
<style name="Theme.Dolphin.Main" parent="Theme.Material3.DayNight.NoActionBar">
<style name="Theme.Dolphin" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/dolphin_primary</item>
<item name="colorOnPrimary">@color/dolphin_onPrimary</item>
<item name="colorPrimaryContainer">@color/dolphin_primary</item>
@ -52,13 +52,16 @@
<item name="homeAsUpIndicator">@drawable/ic_back</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">@bool/lightStatusBar</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">@bool/lightSystemBars</item>
<item name="materialAlertDialogTheme">@style/DolphinMaterialDialog</item>
<item name="popupTheme">@style/DolphinPopup</item>
<item name="sliderStyle">@style/DolphinSlider</item>
</style>
<!-- Trick for API >= 27 specific changes -->
<style name="Theme.Dolphin.Main" parent="Theme.Dolphin" />
<style name="Theme.Dolphin.Main.Material" parent="Theme.Dolphin.Main">
<item name="colorPrimaryContainer">@color/dolphin_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/dolphin_onPrimaryContainer</item>