[Android] UI : Add shadow for black theme Playlist

Alexandre Perraud git at videolan.org
Fri Apr 3 16:43:17 CEST 2015


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Fri Apr  3 16:42:06 2015 +0200| [f9eb658b34e6514d1f8b40545c99396913202b90] | committer: Alexandre Perraud

UI : Add shadow for black theme Playlist

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

 vlc-android/res/drawable-hdpi/shadow_bottom_dark.9.png |  Bin 0 -> 274 bytes
 vlc-android/res/drawable-hdpi/shadow_top_dark.9.png    |  Bin 0 -> 278 bytes
 vlc-android/res/layout/audio_player.xml                |   10 +++++-----
 vlc-android/res/layout/shadow_bottom.xml               |    2 +-
 vlc-android/res/layout/shadow_top.xml                  |    2 +-
 vlc-android/res/values/attrs.xml                       |    2 ++
 vlc-android/res/values/styles.xml                      |    4 ++++
 7 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/vlc-android/res/drawable-hdpi/shadow_bottom_dark.9.png b/vlc-android/res/drawable-hdpi/shadow_bottom_dark.9.png
new file mode 100644
index 0000000..43ed7dc
Binary files /dev/null and b/vlc-android/res/drawable-hdpi/shadow_bottom_dark.9.png differ
diff --git a/vlc-android/res/drawable-hdpi/shadow_top_dark.9.png b/vlc-android/res/drawable-hdpi/shadow_top_dark.9.png
new file mode 100644
index 0000000..5ab4e19
Binary files /dev/null and b/vlc-android/res/drawable-hdpi/shadow_top_dark.9.png differ
diff --git a/vlc-android/res/layout/audio_player.xml b/vlc-android/res/layout/audio_player.xml
index 4ebf7d7..49fee19 100644
--- a/vlc-android/res/layout/audio_player.xml
+++ b/vlc-android/res/layout/audio_player.xml
@@ -102,11 +102,6 @@
             android:background="#00000000" />
     </LinearLayout>
 
-    <include layout="@layout/shadow_top"
-        android:layout_width="match_parent"
-        android:layout_height="6dp"
-        android:layout_below="@+id/header"/>
-
     <ViewSwitcher
         android:id="@+id/view_switcher"
         android:layout_width="match_parent"
@@ -128,6 +123,11 @@
             android:layout_height="fill_parent"/>
     </ViewSwitcher>
 
+    <include layout="@layout/shadow_top"
+        android:layout_width="match_parent"
+        android:layout_height="6dp"
+        android:layout_below="@+id/header"/>
+
     <include layout="@layout/shadow_bottom"
         android:layout_width="match_parent"
         android:layout_height="6dp"
diff --git a/vlc-android/res/layout/shadow_bottom.xml b/vlc-android/res/layout/shadow_bottom.xml
index 34942a6..6b78a1d 100644
--- a/vlc-android/res/layout/shadow_bottom.xml
+++ b/vlc-android/res/layout/shadow_bottom.xml
@@ -2,4 +2,4 @@
 <View xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="6dp"
-    android:background="@drawable/shadow_bottom"/>
\ No newline at end of file
+    android:background="?attr/shadow_bottom_9patch"/>
\ No newline at end of file
diff --git a/vlc-android/res/layout/shadow_top.xml b/vlc-android/res/layout/shadow_top.xml
index 2b9f7f9..307833b 100644
--- a/vlc-android/res/layout/shadow_top.xml
+++ b/vlc-android/res/layout/shadow_top.xml
@@ -2,4 +2,4 @@
 <View xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="6dp"
-    android:background="@drawable/shadow_top"/>
\ No newline at end of file
+    android:background="?attr/shadow_top_9patch"/>
\ No newline at end of file
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index 13f36aa..889e83c 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -63,6 +63,8 @@
 
     <attr name="mini_player_top_shadow" format="reference" />
     <attr name="audio_playlist_shadow" format="reference" />
+    <attr name="shadow_top_9patch" format="reference"/>
+    <attr name="shadow_bottom_9patch" format="reference"/>
 
     <attr name="advanced_options_style" format="reference" />
 
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index db4c2b5..532d6c4 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -68,6 +68,8 @@
         <item name="ic_move_media">@drawable/ic_move_media</item>
         <item name="ic_save">@drawable/ic_save_grey600_48dp</item>
         <item name="ic_trash_small_normal">@drawable/ic_trash_small_normal</item>
+        <item name="shadow_top_9patch">@drawable/shadow_top</item>
+        <item name="shadow_bottom_9patch">@drawable/shadow_bottom</item>
         <item name="gridview_progressbar">@drawable/gridview_progressbar_w</item>
         <item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsLight</item>
     </style>
@@ -139,6 +141,8 @@
         <item name="ic_move_media">@drawable/ic_move_media_w</item>
         <item name="ic_save">@drawable/ic_save_white_48dp</item>
         <item name="ic_trash_small_normal">@drawable/ic_trash_small_normal_w</item>
+        <item name="shadow_top_9patch">@drawable/shadow_top_dark</item>
+        <item name="shadow_bottom_9patch">@drawable/shadow_bottom_dark</item>
         <item name="gridview_progressbar">@drawable/gridview_progressbar</item>
         <item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsBlack</item>
     </style>



More information about the Android mailing list