[Android] use the same highlight colors in the sidebar

Sebastien Toque git at videolan.org
Sun Sep 2 17:07:45 CEST 2012


vlc-ports/android | branch: master | Sebastien Toque <xilasz at Rebellia.(none)> | Sun Sep  2 17:04:46 2012 +0200| [2d7312d439ebaec37ce6f28fdd8fc4c8a0b3a033] | committer: Sebastien Toque

use the same highlight colors in the sidebar

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

 vlc-android/res/drawable/background_item.xml |   26 ++++++++++++++++++++++++++
 vlc-android/res/layout/sidebar_item.xml      |    1 +
 2 files changed, 27 insertions(+)

diff --git a/vlc-android/res/drawable/background_item.xml b/vlc-android/res/drawable/background_item.xml
new file mode 100644
index 0000000..4df8a89
--- /dev/null
+++ b/vlc-android/res/drawable/background_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true">
+        <shape>
+            <gradient
+                android:angle="270"
+                android:centerColor="@color/orange"
+                android:endColor="@color/darkorange"
+                android:startColor="@color/darkorange" />
+        </shape>
+    </item>
+    <item android:state_selected="true">
+        <shape>
+            <gradient
+                android:angle="270"
+                android:centerColor="@color/orange"
+                android:endColor="@color/darkorange"
+                android:startColor="@color/darkorange" />
+        </shape>
+    </item>
+    <item>
+        <shape>
+            <solid android:color="@android:color/transparent"/>
+        </shape>
+    </item>
+</selector>
diff --git a/vlc-android/res/layout/sidebar_item.xml b/vlc-android/res/layout/sidebar_item.xml
index 584f176..204e29f 100644
--- a/vlc-android/res/layout/sidebar_item.xml
+++ b/vlc-android/res/layout/sidebar_item.xml
@@ -8,6 +8,7 @@
     android:layout_marginTop="5dip"
     android:padding="13dip"
     android:drawableLeft="@drawable/icon"
+    android:background="@drawable/background_item"
     android:text="@string/title"
     android:textColor="#ffffff"
     android:textSize="20dip"



More information about the Android mailing list