diff options
author | ByteHamster <info@bytehamster.com> | 2022-12-15 23:18:14 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-12-17 10:51:07 +0100 |
commit | 1d251492b08ca17852e4a8bb5b0a9638443da9b2 (patch) | |
tree | c34e5b60ceb3c94504f7d6ef26fb7dd097a4ae63 /core/src/main/res/values | |
parent | 690eb6af8de3f9b8bb55adfdd9f524abe9a7b022 (diff) | |
download | AntennaPod-1d251492b08ca17852e4a8bb5b0a9638443da9b2.zip |
Add support for Material You tinted theme
Diffstat (limited to 'core/src/main/res/values')
-rw-r--r-- | core/src/main/res/values/attrs.xml | 6 | ||||
-rw-r--r-- | core/src/main/res/values/colors.xml | 11 | ||||
-rw-r--r-- | core/src/main/res/values/styles.xml | 164 |
3 files changed, 96 insertions, 85 deletions
diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml index 67f11694d..57fde8e10 100644 --- a/core/src/main/res/values/attrs.xml +++ b/core/src/main/res/values/attrs.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <attr name="navigation_up" format="reference"/> <attr name="dragview_background" format="reference"/> <attr name="progressBarTheme" format="reference"/> - <attr name="master_switch_background" format="color"/> - <attr name="currently_playing_background" format="color"/> - <attr name="drawer_activated_color" format="color"/> <attr name="action_icon_color" format="color"/> <attr name="scrollbar_thumb" format="reference"/> <attr name="background_color" format="color"/> @@ -16,6 +12,4 @@ <attr name="icon_green" format="color" /> <attr name="icon_purple" format="color" /> <attr name="icon_gray" format="color" /> - <attr name="card_background" format="color" /> - <attr name="card_background_playing" format="color" /> </resources> diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml index 8b84e11a2..1e467802e 100644 --- a/core/src/main/res/values/colors.xml +++ b/core/src/main/res/values/colors.xml @@ -7,9 +7,6 @@ <color name="light_gray">#bfbfbf</color> <color name="medium_gray">#afafaf</color> <color name="black">#000000</color> - <color name="download_success_green">#248800</color> - <color name="download_warning_yellow">#F59F00</color> - <color name="download_failed_red">#B00020</color> <color name="image_readability_tint">#80000000</color> <color name="feed_image_bg">#50000000</color> <color name="feed_text_bg">#ccbfbfbf</color> @@ -19,21 +16,13 @@ <color name="background_elevated_light">#EFEEEE</color> <color name="background_darktheme">#21272b</color> <color name="background_elevated_darktheme">#2D3337</color> - <color name="highlight_light">#46C6C6C6</color> - <color name="highlight_dark">#43707070</color> - <color name="highlight_trueblack">#43707070</color> <color name="non_square_icon_background">#22777777</color> <color name="seek_background_light">#90000000</color> <color name="seek_background_dark">#905B5B5B</color> <color name="navigation_bar_divider_light">#1F000000</color> <color name="accent_light">#0078C2</color> - <color name="accent_light_alpha">#250078C2</color> <color name="accent_dark">#3D8BFF</color> - <color name="accent_dark_alpha">#253D8BFF</color> <color name="icon_background_gradient_start">#0ba2ff</color> <color name="icon_background_gradient_end">#0878ff</color> - - <color name="master_switch_background_light">#DDDDDD</color> - <color name="master_switch_background_dark">#191919</color> </resources> diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index c398dfa8d..463aa70c8 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -1,36 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> - <style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light"> + <style name="Theme.AntennaPod.Dynamic.Light" parent="Theme.Base.AntennaPod.Dynamic.Light"> <!-- Room for API dependent attributes --> </style> - <style name="Theme.Base.AntennaPod.Light" parent="Theme.Material3.Light"> - <item name="colorPrimary">@color/accent_light</item> - <item name="colorAccent">@color/accent_light</item> - <item name="colorSecondary">@color/accent_light</item> - <item name="colorOnSecondary">@color/white</item> + <style name="Theme.Base.AntennaPod.Dynamic.Light" parent="Theme.Material3.DynamicColors.Light"> <item name="progressBarTheme">@style/ProgressBarLight</item> - <item name="colorPrimaryDark">@color/accent_light</item> - <item name="colorPrimaryContainer">@color/accent_light</item> - <item name="colorOnPrimaryContainer">@color/white</item> - <item name="android:windowBackground">@color/background_light</item> - <item name="colorSurface">@color/background_light</item> <item name="background_color">@color/background_light</item> - <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Light</item> + <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar</item> <item name="background_elevated">@color/background_elevated_light</item> - <item name="master_switch_background">@color/master_switch_background_light</item> - <item name="currently_playing_background">@color/highlight_light</item> <item name="action_icon_color">@color/black</item> - <item name="drawer_activated_color">@color/accent_light_alpha</item> <item name="android:textAllCaps">false</item> - <item name="android:textColorHint">@color/grey600</item> <item name="seek_background">@color/seek_background_light</item> - <item name="navigation_up">@drawable/navigation_up</item> <item name="dragview_background">@drawable/ic_drag_lighttheme</item> <item name="scrollbar_thumb">@drawable/scrollbar_thumb_light</item> - <item name="card_background">#EFEEEE</item> - <item name="card_background_playing">#D8D8D8</item> <item name="icon_red">#CF1800</item> <item name="icon_yellow">#F59F00</item> <item name="icon_green">#008537</item> @@ -41,37 +25,33 @@ <item name="android:windowContentTransitions" tools:targetApi="lollipop">true</item> </style> - <style name="Theme.AntennaPod.Dark" parent="Theme.Base.AntennaPod.Dark"> + <style name="Theme.AntennaPod.Light" parent="Theme.AntennaPod.Dynamic.Light"> + <item name="colorPrimary">@color/accent_light</item> + <item name="colorAccent">@color/accent_light</item> + <item name="colorSecondary">@color/accent_light</item> + <item name="colorOnSecondary">@color/white</item> + <item name="colorPrimaryDark">@color/accent_light</item> + <item name="colorPrimaryContainer">@color/accent_light</item> + <item name="colorOnPrimaryContainer">@color/white</item> + <item name="android:windowBackground">@color/background_light</item> + <item name="colorSurface">@color/background_light</item> + <item name="colorSurfaceVariant">#B8E4FF</item> + </style> + + <style name="Theme.AntennaPod.Dynamic.Dark" parent="Theme.Base.AntennaPod.Dynamic.Dark"> <!-- Room for API dependent attributes --> </style> - <style name="Theme.Base.AntennaPod.Dark" parent="Theme.Material3.Dark"> - <item name="colorAccent">@color/accent_dark</item> - <item name="colorSecondary">@color/accent_dark</item> - <item name="colorOnSecondary">@color/black</item> - <item name="colorPrimary">@color/accent_dark</item> - <item name="colorPrimaryDark">@color/background_darktheme</item> - <item name="colorPrimaryContainer">@color/accent_dark</item> - <item name="colorOnPrimaryContainer">@color/black</item> - <item name="android:windowBackground">@color/background_darktheme</item> - <item name="colorSurface">@color/background_darktheme</item> + <style name="Theme.Base.AntennaPod.Dynamic.Dark" parent="Theme.Material3.DynamicColors.Dark"> + <item name="progressBarTheme">@style/ProgressBarDark</item> <item name="background_color">@color/background_darktheme</item> - <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Dark</item> + <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar</item> <item name="background_elevated">@color/background_elevated_darktheme</item> - <item name="colorControlNormal">@color/white</item> - <item name="progressBarTheme">@style/ProgressBarDark</item> - <item name="drawer_activated_color">@color/accent_dark_alpha</item> - <item name="master_switch_background">@color/master_switch_background_dark</item> - <item name="currently_playing_background">@color/highlight_dark</item> <item name="action_icon_color">@color/white</item> <item name="android:textAllCaps">false</item> - <item name="android:textColorHint">@color/medium_gray</item> <item name="seek_background">@color/seek_background_dark</item> - <item name="navigation_up">@drawable/navigation_up_dark</item> <item name="dragview_background">@drawable/ic_drag_darktheme</item> <item name="scrollbar_thumb">@drawable/scrollbar_thumb_dark</item> - <item name="card_background">#2d3337</item> - <item name="card_background_playing">#444D53</item> <item name="icon_red">#CF1800</item> <item name="icon_yellow">#F59F00</item> <item name="icon_green">#008537</item> @@ -85,33 +65,57 @@ <item name="android:navigationBarColor" tools:targetApi="lollipop">@color/background_darktheme</item> </style> - <style name="Theme.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.TrueBlack"> - <!-- Room for API dependent attributes --> + <style name="Theme.AntennaPod.Dark" parent="Theme.AntennaPod.Dynamic.Dark"> + <item name="colorPrimary">@color/accent_dark</item> + <item name="colorAccent">@color/accent_dark</item> + <item name="colorSecondary">@color/accent_dark</item> + <item name="colorOnSecondary">@color/black</item> + <item name="colorPrimaryDark">@color/accent_dark</item> + <item name="colorPrimaryContainer">@color/accent_dark</item> + <item name="colorOnPrimaryContainer">@color/black</item> + <item name="android:windowBackground">@color/background_darktheme</item> + <item name="colorSurface">@color/background_darktheme</item> + <item name="colorSurfaceVariant">#1B3B6A</item> + </style> + + <style name="Theme.AntennaPod.Dynamic.TrueBlack" parent="Theme.AntennaPod.Dynamic.Dark"> + <item name="android:textColorPrimary">@color/white</item> + <item name="android:color">@color/white</item> + <item name="android:windowBackground">@color/black</item> + <item name="colorSurface">@color/black</item> + <item name="background_color">@color/black</item> + <item name="background_elevated">@color/black</item> + <item name="android:navigationBarColor" tools:targetApi="lollipop">@color/black</item> </style> - <style name="Theme.Base.AntennaPod.TrueBlack" parent="Theme.AntennaPod.Dark"> - <item name="colorPrimaryDark">@color/black</item> - <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Black</item> - <item name="drawer_activated_color">@color/highlight_trueblack</item> - <item name="currently_playing_background">@color/highlight_trueblack</item> + <style name="Theme.AntennaPod.TrueBlack" parent="Theme.AntennaPod.Dark"> <item name="android:textColorPrimary">@color/white</item> <item name="android:color">@color/white</item> - <item name="android:colorBackground">@color/black</item> <item name="android:windowBackground">@color/black</item> <item name="colorSurface">@color/black</item> <item name="background_color">@color/black</item> - <item name="android:actionBarStyle">@color/black</item> <item name="background_elevated">@color/black</item> - <item name="android:textColorHint">@color/medium_gray</item> <item name="android:navigationBarColor" tools:targetApi="lollipop">@color/black</item> </style> + <style name="Theme.AntennaPod.Dynamic.Light.NoTitle" parent="Theme.AntennaPod.Dynamic.Light"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + <item name="windowActionModeOverlay">true</item> + </style> + <style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AntennaPod.Light"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="windowActionModeOverlay">true</item> </style> + <style name="Theme.AntennaPod.Dynamic.Dark.NoTitle" parent="Theme.AntennaPod.Dynamic.Dark"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + <item name="windowActionModeOverlay">true</item> + </style> + <style name="Theme.AntennaPod.Dark.NoTitle" parent="Theme.AntennaPod.Dark"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> @@ -124,6 +128,23 @@ <item name="windowActionModeOverlay">true</item> </style> + <style name="Theme.AntennaPod.Dynamic.TrueBlack.NoTitle" parent="Theme.AntennaPod.Dynamic.TrueBlack"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + <item name="windowActionModeOverlay">true</item> + </style> + + <style name="Theme.AntennaPod.Dynamic.Light.Translucent" parent="Theme.AntennaPod.Dynamic.Light.NoTitle"> + <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item> + <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:backgroundDimEnabled">true</item> + <item name="android:windowAnimationStyle">@style/AnimationFade</item> + <item name="android:fitsSystemWindows">true</item> + </style> + <style name="Theme.AntennaPod.Light.Translucent" parent="Theme.AntennaPod.Light.NoTitle"> <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item> <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> @@ -135,6 +156,17 @@ <item name="android:fitsSystemWindows">true</item> </style> + <style name="Theme.AntennaPod.Dynamic.Dark.Translucent" parent="Theme.AntennaPod.Dynamic.Dark.NoTitle"> + <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item> + <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:backgroundDimEnabled">true</item> + <item name="android:windowAnimationStyle">@style/AnimationFade</item> + <item name="android:fitsSystemWindows">true</item> + </style> + <style name="Theme.AntennaPod.Dark.Translucent" parent="Theme.AntennaPod.Dark.NoTitle"> <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item> <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> @@ -146,6 +178,17 @@ <item name="android:fitsSystemWindows">true</item> </style> + <style name="Theme.AntennaPod.Dynamic.TrueBlack.Translucent" parent="Theme.AntennaPod.Dynamic.TrueBlack.NoTitle"> + <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item> + <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowContentOverlay">@null</item> + <item name="android:backgroundDimEnabled">true</item> + <item name="android:windowAnimationStyle">@style/AnimationFade</item> + <item name="android:fitsSystemWindows">true</item> + </style> + <style name="Theme.AntennaPod.TrueBlack.Translucent" parent="Theme.AntennaPod.TrueBlack.NoTitle"> <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item> <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> @@ -199,14 +242,6 @@ <item name="android:ellipsize">end</item> </style> - <style name="BigBlurryBackground"> - <item name="android:scaleType">centerCrop</item> - <!-- <item name="android:tint">@color/image_readability_tint</item> --> - <!-- Reactivate when Glide's tinting has been fixed for Android 5.x - Remove color filter from ItemlistFragment --> - - </style> - <style name="ProgressBarLight"> <item name="android:indeterminateOnly">false</item> <item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item> @@ -226,16 +261,9 @@ <item name="fastScrollVerticalTrackDrawable">@drawable/scrollbar_track</item> </style> - <style name="Widget.AntennaPod.ActionBar.Light" parent="Widget.Material3.Light.ActionBar.Solid"> - <item name="background">@color/background_light</item> - </style> - - <style name="Widget.AntennaPod.ActionBar.Dark" parent="Widget.Material3.Light.ActionBar.Solid"> - <item name="background">@color/background_darktheme</item> - </style> - - <style name="Widget.AntennaPod.ActionBar.Black" parent="Widget.Material3.Light.ActionBar.Solid"> - <item name="background">@color/black</item> + <style name="Widget.AntennaPod.ActionBar" parent="Widget.Material3.Light.ActionBar.Solid"> + <item name="background">?android:attr/colorBackground</item> + <item name="elevation">0dp</item> </style> <style name="AddPodcastTextView"> |