[Android] Improve action mode colors
Nicolas Pomepuy
git at videolan.org
Wed Jun 5 11:51:01 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue May 7 14:42:17 2024 +0200| [dc42a7461a969564dc48f850d7455d8452e19942] | committer: Nicolas Pomepuy
Improve action mode colors
> https://code.videolan.org/videolan/vlc-android/commit/dc42a7461a969564dc48f850d7455d8452e19942
---
.../resources/src/main/res/values/colors.xml | 3 ++
application/vlc-android/res/values/styles.xml | 40 ++++++++++++++++++++--
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/application/resources/src/main/res/values/colors.xml b/application/resources/src/main/res/values/colors.xml
index 0d96f23ed7..32ab3a6393 100644
--- a/application/resources/src/main/res/values/colors.xml
+++ b/application/resources/src/main/res/values/colors.xml
@@ -49,6 +49,9 @@
<color name="grey875">#2a2a2a</color>
<color name="grey900">#212121</color>
+ <color name="action_mode_dark">@color/grey875</color>
+ <color name="action_mode_light">#fff3e0</color>
+
<color name="dark_background">#131313</color>
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index a269600e2a..22200019c2 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -31,12 +31,14 @@
<item name="colorOnPrimary">@color/white</item>
<item name="colorAccent">@color/orange800</item>
<item name="windowActionModeOverlay">true</item>
+ <item name="actionModeTheme">@style/ThemeOverlay.ActionMode</item>
+ <item name="actionModeStyle">@style/ActionMode</item>
<item name="colorOnSurface">@color/black</item>
<item name="colorControlHighlight">@color/orange800</item>
<item name="colorControlNormal">@color/grey700</item>
- <item name="actionModeBackground">@color/grey400</item>
+ <item name="actionModeBackground">@color/action_mode_light</item>
<item name="background_default">@color/white</item>
<item name="bottom_navigation_background">@drawable/bottom_navigation_background</item>
<item name="audio_header_background">@color/white</item>
@@ -195,7 +197,9 @@
<item name="colorControlNormal">@color/grey300</item>
<item name="windowActionModeOverlay">true</item>
- <item name="actionModeBackground">@color/grey875</item>
+ <item name="actionModeTheme">@style/ThemeOverlay.ActionMode.Dark</item>
+ <item name="actionModeStyle">@style/ActionMode.Dark</item>
+ <item name="actionModeBackground">@color/action_mode_dark</item>
<item name="background_default">@color/dark_background</item>
<item name="bottom_navigation_background">@drawable/bottom_navigation_background_dark</item>
<item name="audio_header_background">@color/mini_player_dark</item>
@@ -266,6 +270,38 @@
<item name="widget_preview_rounded_bg">@drawable/rounded_top_corners_left_background_dark</item>
</style>
+
+ <style name="ActionMode" parent="Widget.AppCompat.ActionBar.Solid">
+ <item name="background">@color/action_mode_light</item>
+ <item name="titleTextStyle">@style/ActionModeTitleTextStyle</item>
+ <item name="subtitleTextStyle">@style/ActionModeSubtitleTextStyle</item>
+ </style>
+ <style name="ActionModeTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
+ <item name="android:textColor">@color/orange800</item>
+ </style>
+ <style name="ActionModeSubtitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle">
+ <item name="android:textColor">@color/orange800</item>
+ </style>
+
+ <style name="ActionMode.Dark" parent="Widget.AppCompat.ActionBar.Solid">
+ <item name="background">@color/action_mode_dark</item>
+ <item name="titleTextStyle">@style/ActionModeTitleTextStyleDark</item>
+ <item name="subtitleTextStyle">@style/ActionModeSubtitleTextStyleDark</item>
+ </style>
+ <style name="ActionModeTitleTextStyleDark" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
+ <item name="android:textColor">@color/orange500</item>
+ </style>
+ <style name="ActionModeSubtitleTextStyleDark" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle">
+ <item name="android:textColor">@color/orange500</item>
+ </style>
+
+ <style name="ThemeOverlay.ActionMode" parent="ThemeOverlay.AppCompat.ActionBar">
+ <item name="colorControlNormal">@color/orange800</item>
+ </style>
+ <style name="ThemeOverlay.ActionMode.Dark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
+ <item name="colorControlNormal">@color/orange500</item>
+ </style>
+
<style name="Theme.VLC.Onboarding" parent="Theme.VLC.Onboarding.7"/>
<style name="Theme.VLC.Onboarding.7" parent="Theme.VLC.Black">
<item name="background_default">@color/onboarding_grey</item>
More information about the Android
mailing list