[Android] Video Player: translucent title after Android 4.2

Thomas Guillem git at videolan.org
Fri Oct 3 14:23:51 CEST 2014


vlc-ports/android | branch: master | Thomas Guillem <thomas.guillem at gmail.com> | Thu Oct  2 09:25:50 2014 +0200| [aba2091e75aefbcc00423f76739eea105db8c589] | committer: Jean-Baptiste Kempf

Video Player: translucent title after Android 4.2

Set the title under the StatusBar translucent with a black shadow.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=aba2091e75aefbcc00423f76739eea105db8c589
---

 vlc-android/res/layout-v17/action_bar_layout.xml |    8 ++++++--
 vlc-android/res/values-v17/styles.xml            |    1 +
 vlc-android/res/values/attrs.xml                 |    1 +
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/layout-v17/action_bar_layout.xml b/vlc-android/res/layout-v17/action_bar_layout.xml
index 7fdf996..c6ba0eb 100644
--- a/vlc-android/res/layout-v17/action_bar_layout.xml
+++ b/vlc-android/res/layout-v17/action_bar_layout.xml
@@ -8,10 +8,14 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="top"
-        android:background="?attr/video_player_overlay"
+        android:background="?attr/status_bar_overlay"
         android:text="@string/title"
         android:textColor="#ffffff"
         android:paddingLeft="5dp"
         android:paddingRight="5dp"
-        android:textSize="15sp" />
+        android:textSize="15sp"
+        android:shadowColor="@color/black"
+        android:shadowDx="3"
+        android:shadowDy="3"
+        android:shadowRadius="1.5" />
 </RelativeLayout>
diff --git a/vlc-android/res/values-v17/styles.xml b/vlc-android/res/values-v17/styles.xml
index fca6653..151b5a8 100644
--- a/vlc-android/res/values-v17/styles.xml
+++ b/vlc-android/res/values-v17/styles.xml
@@ -5,6 +5,7 @@
         <item name="android:windowActionBarOverlay">true</item>
 
         <item name="video_player_overlay">@color/transparent_gray</item>
+        <item name="status_bar_overlay">@android:color/transparent</item>
         <item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsBlack</item>
     </style>
 </resources>
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index 3b6f386..cf6a7ee 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -13,6 +13,7 @@
     <attr name="font_default" format="reference|color" />
     <attr name="font_light" format="reference|color" />
     <attr name="video_player_overlay" format="reference|color" />
+    <attr name="status_bar_overlay" format="reference|color" />
     <attr name="advanced_options_divider" format="reference|color" />
     <attr name="audio_browser_separator" format="reference|color" />
     <attr name="playlist_item_drag_shadow" format="reference|color" />



More information about the Android mailing list