mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Refactor Styles, disable colored navigation bar when we can't be sure that navigation bar buttons will have enough contrast (API < 27)
This commit is contained in:
parent
8d64eac853
commit
8002cc2771
@ -1,28 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Base.V21.OpeningTheme" parent="Base.V7.OpeningTheme">
|
||||
<!-- Opening Theme -->
|
||||
<style name="Base.V21.OpeningTheme" parent="Base.V19.OpeningTheme">
|
||||
<item name="android:navigationBarColor">@color/light_youtube_primary_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.OpeningTheme" parent="Base.V21.OpeningTheme" />
|
||||
|
||||
<style name="Base.V21.LightTheme" parent="Base.V7.LightTheme">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
<!-- Base Theme -->
|
||||
<style name="Base.V21" parent="Base.V19"/>
|
||||
<style name="Base" parent="Base.V21"/>
|
||||
|
||||
<!-- Light Theme -->
|
||||
<style name="Base.V21.LightTheme" parent="Base.V19.LightTheme">
|
||||
|
||||
</style>
|
||||
<style name="Base.LightTheme" parent="Base.V21.LightTheme" />
|
||||
|
||||
<style name="Base.V21.DarkTheme" parent="Base.V7.DarkTheme">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
<!-- Dark Theme -->
|
||||
<style name="Base.V21.DarkTheme" parent="Base.V19.DarkTheme">
|
||||
|
||||
</style>
|
||||
<style name="Base.DarkTheme" parent="Base.V21.DarkTheme" />
|
||||
|
||||
<style name="Base.V21.BlackTheme" parent="Base.V7.BlackTheme">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
<!-- Black Theme -->
|
||||
<style name="Base.V21.BlackTheme" parent="Base.V19.BlackTheme">
|
||||
|
||||
</style>
|
||||
<style name="Base.BlackTheme" parent="Base.V21.BlackTheme" />
|
||||
|
||||
</resources>
|
||||
|
@ -1,22 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Base Theme -->
|
||||
<style name="Base.V27" parent="Base.V21">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
<style name="Base" parent="Base.V27"/>
|
||||
|
||||
<!-- Light Theme -->
|
||||
<style name="Base.V27.LightTheme" parent="Base.V21.LightTheme">
|
||||
<item name="android:windowLightNavigationBar">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.LightTheme" parent="Base.V27.LightTheme" />
|
||||
|
||||
<!-- Dark Theme -->
|
||||
<style name="Base.V27.DarkTheme" parent="Base.V21.DarkTheme">
|
||||
<item name="android:windowLightNavigationBar">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.DarkTheme" parent="Base.V27.DarkTheme" />
|
||||
|
||||
<!-- Black Theme -->
|
||||
<style name="Base.V27.BlackTheme" parent="Base.V21.BlackTheme">
|
||||
<item name="android:windowLightNavigationBar">false</item>
|
||||
<!-- BlackTheme inherits DarkTheme, so no need to specify windowLightNavigationBar here -->
|
||||
</style>
|
||||
|
||||
<style name="Base.BlackTheme" parent="Base.V27.BlackTheme" />
|
||||
|
||||
</resources>
|
||||
|
@ -1,22 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Base.V29.LightTheme" parent="Base.V27.LightTheme">
|
||||
<!-- Base Theme -->
|
||||
<style name="Base.V29" parent="Base.V27">
|
||||
<item name="android:enforceNavigationBarContrast">false</item>
|
||||
</style>
|
||||
<style name="Base" parent="Base.V29"/>
|
||||
|
||||
<!-- Light Theme -->
|
||||
<style name="Base.V29.LightTheme" parent="Base.V27.LightTheme">
|
||||
</style>
|
||||
<style name="Base.LightTheme" parent="Base.V29.LightTheme" />
|
||||
|
||||
<!-- Dark Theme -->
|
||||
<style name="Base.V29.DarkTheme" parent="Base.V27.DarkTheme">
|
||||
<item name="android:enforceNavigationBarContrast">false</item>
|
||||
</style>
|
||||
|
||||
</style>
|
||||
<style name="Base.DarkTheme" parent="Base.V29.DarkTheme" />
|
||||
|
||||
<!-- Black Theme -->
|
||||
<style name="Base.V29.BlackTheme" parent="Base.V27.BlackTheme">
|
||||
<item name="android:enforceNavigationBarContrast">false</item>
|
||||
</style>
|
||||
|
||||
</style>
|
||||
<style name="Base.BlackTheme" parent="Base.V29.BlackTheme" />
|
||||
|
||||
</resources>
|
||||
|
@ -1,9 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<style name="Base.V7.OpeningTheme" parent="Theme.AppCompat.DayNight.NoActionBar"/>
|
||||
|
||||
<style name="Base.OpeningTheme" parent="Base.V7.OpeningTheme"/>
|
||||
|
||||
<!-- Opening Theme -->
|
||||
<style name="Base.V19.OpeningTheme" parent="Theme.AppCompat.DayNight.NoActionBar"/>
|
||||
<style name="Base.OpeningTheme" parent="Base.V19.OpeningTheme"/>
|
||||
<style name="OpeningTheme" parent="Base.OpeningTheme">
|
||||
<item name="colorPrimary">@android:color/transparent</item>
|
||||
<item name="colorPrimaryDark">@android:color/transparent</item>
|
||||
@ -12,18 +11,14 @@
|
||||
<item name="android:windowBackground">@drawable/splash_background</item>
|
||||
</style>
|
||||
|
||||
<!-- Base themes -->
|
||||
<style name="Base.V7" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!-- Base Theme -->
|
||||
<style name="Base.V19" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
</style>
|
||||
<style name="Base" parent="Base.V19"/>
|
||||
|
||||
<style name="Base" parent="Base.V7"/>
|
||||
|
||||
<style name="Base.V7.LightTheme" parent="Base" />
|
||||
|
||||
<style name="Base.LightTheme" parent="Base.V7.LightTheme" />
|
||||
|
||||
<style name="LightTheme" parent="Base.LightTheme">
|
||||
<!-- Light Theme -->
|
||||
<style name="Base.V19.LightTheme" parent="Base">
|
||||
<item name="colorPrimary">@color/light_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/light_youtube_primary_color</item>
|
||||
<item name="colorAccent">@color/light_youtube_accent_color</item>
|
||||
@ -43,12 +38,11 @@
|
||||
<item name="border_color">@color/light_border_color</item>
|
||||
<item name="dashed_border">@drawable/dashed_border_light</item>
|
||||
</style>
|
||||
<style name="Base.LightTheme" parent="Base.V19.LightTheme" />
|
||||
<style name="LightTheme" parent="Base.LightTheme"/>
|
||||
|
||||
<style name="Base.V7.DarkTheme" parent="Base" />
|
||||
|
||||
<style name="Base.DarkTheme" parent="Base.V7.DarkTheme" />
|
||||
|
||||
<style name="DarkTheme" parent="Base.DarkTheme">
|
||||
<!-- Dark Theme -->
|
||||
<style name="Base.V19.DarkTheme" parent="Base">
|
||||
<item name="colorPrimary">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorPrimaryDark">@color/dark_youtube_primary_color</item>
|
||||
<item name="colorAccent">@color/dark_youtube_accent_color</item>
|
||||
@ -68,12 +62,11 @@
|
||||
<item name="border_color">@color/dark_border_color</item>
|
||||
<item name="dashed_border">@drawable/dashed_border_dark</item>
|
||||
</style>
|
||||
<style name="Base.DarkTheme" parent="Base.V19.DarkTheme" />
|
||||
<style name="DarkTheme" parent="Base.DarkTheme"/>
|
||||
|
||||
<style name="Base.V7.BlackTheme" parent="DarkTheme" />
|
||||
|
||||
<style name="Base.BlackTheme" parent="Base.V7.BlackTheme" />
|
||||
|
||||
<style name="BlackTheme" parent="Base.BlackTheme">
|
||||
<!-- Black Theme -->
|
||||
<style name="Base.V19.BlackTheme" parent="DarkTheme">
|
||||
<item name="android:windowBackground">@color/black_background_color</item>
|
||||
<item name="windowBackground">@color/black_background_color</item>
|
||||
|
||||
@ -85,6 +78,8 @@
|
||||
<item name="border_color">@color/black_border_color</item>
|
||||
<item name="dashed_border">@drawable/dashed_border_black</item>
|
||||
</style>
|
||||
<style name="Base.BlackTheme" parent="Base.V19.BlackTheme" />
|
||||
<style name="BlackTheme" parent="Base.BlackTheme"/>
|
||||
|
||||
<!-- Dialogs -->
|
||||
<style name="LightDialogTheme" parent="Theme.AppCompat.DayNight.Dialog">
|
||||
|
Loading…
Reference in New Issue
Block a user