[Android] UI : Change @color reference by ?attr

Alexandre Perraud git at videolan.org
Thu Jan 30 10:42:36 CET 2014


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Wed Jan 29 18:11:53 2014 +0100| [4f9ba33a27559ed99b19a29a8be13d5ffd6efced] | committer: Adrien Maglo

UI : Change @color reference by ?attr

When it's possible.

Signed-off-by: Adrien Maglo <magsoft at videolan.org>

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

 vlc-android/res/layout/audio_playlist_item_drag_shadow.xml |    2 +-
 vlc-android/res/layout/player.xml                          |    4 ++--
 vlc-android/res/values-v11/styles.xml                      |    1 +
 vlc-android/res/values/attrs.xml                           |    2 ++
 vlc-android/res/values/styles.xml                          |    2 ++
 5 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/layout/audio_playlist_item_drag_shadow.xml b/vlc-android/res/layout/audio_playlist_item_drag_shadow.xml
index f2ce188..543ced7 100644
--- a/vlc-android/res/layout/audio_playlist_item_drag_shadow.xml
+++ b/vlc-android/res/layout/audio_playlist_item_drag_shadow.xml
@@ -12,7 +12,7 @@
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_weight="1"
-        android:background="@color/darkerorange"
+        android:background="?attr/darkerorange"
         android:orientation="horizontal"
         android:paddingLeft="10dp" >
 
diff --git a/vlc-android/res/layout/player.xml b/vlc-android/res/layout/player.xml
index 9fe1240..e0c6ede 100644
--- a/vlc-android/res/layout/player.xml
+++ b/vlc-android/res/layout/player.xml
@@ -63,7 +63,7 @@
             android:layout_height="wrap_content"
             android:layout_alignParentTop="true"
             android:layout_gravity="top"
-            android:background="@color/transparent_gray"
+            android:background="?attr/transparent_gray"
             android:paddingLeft="5dp"
             android:paddingRight="5dp" >
 
@@ -126,7 +126,7 @@
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:layout_alignParentBottom="true"
-            android:background="@color/transparent_gray"
+            android:background="?attr/transparent_gray"
             android:paddingLeft="5dp"
             android:paddingRight="5dp" >
 
diff --git a/vlc-android/res/values-v11/styles.xml b/vlc-android/res/values-v11/styles.xml
index 6b2c0a8..44a5869 100644
--- a/vlc-android/res/values-v11/styles.xml
+++ b/vlc-android/res/values-v11/styles.xml
@@ -23,6 +23,7 @@
         <item name="font_light">@color/font_light</item>
         <item name="orange">@color/orange</item>
         <item name="darkorange">@color/darkorange</item>
+        <item name="darkerorange">@color/darkerorange</item>
         <item name="android:windowBackground">@color/background_common</item>
     </style>
 </resources>
\ No newline at end of file
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index cbff357..abe912d 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -14,6 +14,8 @@
     <attr name="font_light" format="reference|color" />
     <attr name="orange" format="reference|color" />
     <attr name="darkorange" format="reference|color" />
+    <attr name="darkerorange" format="reference|color" />
+    <attr name="transparent_gray" format="reference|color" />
 
     <declare-styleable name="SlidingPaneLayout">
         <attr name="overhangSize" format="dimension" />
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index c385543..f1b1573 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -30,6 +30,7 @@
         <item name="font_light">@color/font_light</item>
         <item name="orange">@color/orange</item>
         <item name="darkorange">@color/darkorange</item>
+        <item name="darkerorange">@color/darkerorange</item>
         <item name="android:windowBackground">@color/background_common</item>
     </style>
 
@@ -69,6 +70,7 @@
 
     <style name="Theme.VLC.Fullscreen" parent="android:Theme.NoTitleBar.Fullscreen">
         <item name="android:windowBackground">@color/black</item>
+        <item name="transparent_gray">@color/transparent_gray</item>
     </style>
 
     <style name="ActionBar" parent="Widget.Sherlock.Light.ActionBar">



More information about the Android mailing list