[Android] use the same highlight colors in the sidebar

Sébastien Toque git at videolan.org
Mon Sep 3 23:51:04 CEST 2012


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Sep  2 17:04:46 2012 +0200| [c42b2ff2989a156bb13f1f221917cbb618e2906b] | committer: Edward Wang

use the same highlight colors in the sidebar

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

 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