[Android] Draw an inner shadow in the sliding menu

Ludovic Fauvet git at videolan.org
Thu Aug 16 16:21:47 CEST 2012


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Thu Aug 16 16:19:17 2012 +0200| [597ea24cbf06a9a3ffedd94081cf655d8d0ce444] | committer: Ludovic Fauvet

Draw an inner shadow in the sliding menu

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

 vlc-android/res/drawable-hdpi/slidingmenu_shadow.png |  Bin 0 -> 177 bytes
 vlc-android/res/layout/sliding_menu.xml              |    4 +++-
 vlc-android/res/values/dimens.xml                    |    3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/vlc-android/res/drawable-hdpi/slidingmenu_shadow.png b/vlc-android/res/drawable-hdpi/slidingmenu_shadow.png
new file mode 100644
index 0000000..54d5fd2
Binary files /dev/null and b/vlc-android/res/drawable-hdpi/slidingmenu_shadow.png differ
diff --git a/vlc-android/res/layout/sliding_menu.xml b/vlc-android/res/layout/sliding_menu.xml
index 42e1ffe..93e645a 100644
--- a/vlc-android/res/layout/sliding_menu.xml
+++ b/vlc-android/res/layout/sliding_menu.xml
@@ -4,4 +4,6 @@
     android:id="@+id/sliding_menu"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    sliding:behindScrollScale="0.5" />
+    sliding:behindScrollScale="0.5"
+    sliding:shadowDrawable="@drawable/slidingmenu_shadow"
+    sliding:shadowWidth="@dimen/shadow_width" />
diff --git a/vlc-android/res/values/dimens.xml b/vlc-android/res/values/dimens.xml
new file mode 100644
index 0000000..b1ffd8c
--- /dev/null
+++ b/vlc-android/res/values/dimens.xml
@@ -0,0 +1,3 @@
+<resources>
+	<dimen name="shadow_width">6px</dimen>
+</resources>
\ No newline at end of file



More information about the Android mailing list