[Android] Properly theme the VLC dialogs

Nicolas Pomepuy git at videolan.org
Wed Jul 24 15:18:36 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Wed Jul 24 11:16:44 2019 +0200| [4f6877a1613d16a5e1c56d5bc69dfc64f14b2102] | committer: Geoffrey Métais

Properly theme the VLC dialogs

> https://code.videolan.org/videolan/vlc-android/commit/4f6877a1613d16a5e1c56d5bc69dfc64f14b2102
---

 vlc-android/res/values-night/styles.xml |  2 ++
 vlc-android/res/values/styles.xml       | 26 +++++++++++++++++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/vlc-android/res/values-night/styles.xml b/vlc-android/res/values-night/styles.xml
index d20838d63..8059be682 100644
--- a/vlc-android/res/values-night/styles.xml
+++ b/vlc-android/res/values-night/styles.xml
@@ -5,4 +5,6 @@
 
     <style name="Theme.VLC.Info"
            parent="Theme.VLC.Info.Black"/>
+
+    <style name="VLCTransparentTheme" parent="VLCTransparentThemeDark"/>
 </resources>
\ No newline at end of file
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index e053fa382..71ed44698 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -346,11 +346,35 @@
         <item name="player_icon_color">@color/grey50</item>
     </style>
 
-    <style name="VLCTransparentTheme" parent="Theme.AppCompat.Light.Dialog.MinWidth">
+    <style name="VLCTransparentTheme" parent="VLCTransparentThemeLight"/>
+
+    <style name="VLCTransparentThemeLight" parent="Theme.MaterialComponents.Light.Dialog.MinWidth">
+
+        <item name="android:background">@android:color/transparent</item>
+        <item name="background">@android:color/transparent</item>
+
+        <item name="colorPrimary">@color/orange500</item>
+        <item name="colorPrimaryDark">@color/transparent</item>
+        <item name="colorAccent">@color/orange500</item>
+
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:colorBackgroundCacheHint">@android:color/transparent</item>
+        <item name="android:windowContentOverlay">@android:color/transparent</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowAnimationStyle">@android:color/transparent</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:backgroundDimEnabled">false</item>
+    </style>
+
+    <style name="VLCTransparentThemeDark" parent="Theme.MaterialComponents.Dialog.MinWidth">
 
         <item name="android:background">@android:color/transparent</item>
         <item name="background">@android:color/transparent</item>
 
+        <item name="colorPrimary">@color/orange500</item>
+        <item name="colorPrimaryDark">@color/transparent</item>
+        <item name="colorAccent">@color/orange500</item>
+
         <item name="android:windowBackground">@android:color/transparent</item>
         <item name="android:colorBackgroundCacheHint">@android:color/transparent</item>
         <item name="android:windowContentOverlay">@android:color/transparent</item>



More information about the Android mailing list