[Android] Styles: do not use colors as attribute names

Adrien Maglo git at videolan.org
Fri Feb 21 14:19:35 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Feb 21 14:19:21 2014 +0100| [3e7becde171243ceba3c83a03d1900178e92e347] | committer: Adrien Maglo

Styles: do not use colors as attribute names

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

 vlc-android/res/layout/audio_browser_separator.xml         |    4 ++--
 vlc-android/res/layout/audio_player.xml                    |    2 +-
 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                      |    6 +++---
 vlc-android/res/values/attrs.xml                           |    8 ++++----
 vlc-android/res/values/styles.xml                          |   12 ++++--------
 7 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/vlc-android/res/layout/audio_browser_separator.xml b/vlc-android/res/layout/audio_browser_separator.xml
index e92dcc2..2ff9d02 100644
--- a/vlc-android/res/layout/audio_browser_separator.xml
+++ b/vlc-android/res/layout/audio_browser_separator.xml
@@ -13,12 +13,12 @@
         android:layout_marginTop="5dip"
         android:singleLine="true"
         android:text="@string/title"
-        android:textColor="?attr/darkorange"
+        android:textColor="?attr/audio_browser_separator"
         android:textSize="20sp" />
     
     <View
         android:layout_width="fill_parent"
         android:layout_height="2dip"
-        android:background="?attr/darkorange" />
+        android:background="?attr/audio_browser_separator" />
 
 </LinearLayout>
diff --git a/vlc-android/res/layout/audio_player.xml b/vlc-android/res/layout/audio_player.xml
index 4d43854..7b91d15 100644
--- a/vlc-android/res/layout/audio_player.xml
+++ b/vlc-android/res/layout/audio_player.xml
@@ -64,7 +64,7 @@
             android:layout_weight="0"
             android:clickable="true"
             android:text="@string/time_0"
-            android:textColor="?attr/darkorange"
+            android:textColor="?attr/audio_player_header_time"
             android:textSize="18sp" />
 
         <ImageButton
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 64ee5aa..5ab2bc1 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="?attr/darkorange"
+        android:background="?attr/playlist_item_drag_shadow"
         android:orientation="horizontal"
         android:paddingLeft="10dp" >
 
diff --git a/vlc-android/res/layout/player.xml b/vlc-android/res/layout/player.xml
index 6d022a8..218116e 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="?attr/transparent_gray"
+            android:background="?attr/video_player_overlay"
             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="?attr/transparent_gray"
+            android:background="?attr/video_player_overlay"
             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 ef5deb3..486b33e 100644
--- a/vlc-android/res/values-v11/styles.xml
+++ b/vlc-android/res/values-v11/styles.xml
@@ -19,11 +19,11 @@
         <item name="background_menu">@color/background_menu</item>
         <item name="background_player">@color/background_player</item>
         <item name="background_playlist">@color/background_playlist</item>
+        <item name="audio_browser_separator">@color/darkorange</item>
+        <item name="playlist_item_drag_shadow">@color/darkorange</item>
+        <item name="audio_player_header_time">@color/darkorange</item>
         <item name="font_default">@color/font_default</item>
         <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 5b74050..2f707fc 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -12,11 +12,11 @@
     <attr name="background_playlist" format="reference|color" />
     <attr name="font_default" format="reference|color" />
     <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" />
+    <attr name="video_player_overlay" format="reference|color" />
     <attr name="advanced_options_divider" format="reference|color" />
+    <attr name="audio_browser_separator" format="reference|color" />
+    <attr name="playlist_item_drag_shadow" format="reference|color" />
+    <attr name="audio_player_header_time" 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 0f31a13..cc2f596 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -27,11 +27,11 @@
         <item name="background_menu">@color/background_menu</item>
         <item name="background_player">@color/background_player</item>
         <item name="background_playlist">@color/background_playlist</item>
+        <item name="audio_browser_separator">@color/darkorange</item>
+        <item name="playlist_item_drag_shadow">@color/darkorange</item>
+        <item name="audio_player_header_time">@color/darkorange</item>
         <item name="font_default">@color/font_default</item>
         <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>
 
@@ -44,8 +44,6 @@
         <item name="background_menu">@color/background_menu</item>
         <item name="font_default">@color/font_default</item>
         <item name="font_light">@color/font_light</item>
-        <item name="orange">@color/orange</item>
-        <item name="darkorange">@color/darkorange</item>
         <item name="android:windowBackground">@color/background_common</item>
     </style>
 
@@ -64,14 +62,12 @@
         <item name="background_player">@color/background_player</item>
         <item name="font_default">@color/font_default</item>
         <item name="font_light">@color/font_light</item>
-        <item name="orange">@color/orange</item>
-        <item name="darkorange">@color/darkorange</item>
         <item name="android:windowBackground">@color/background_common</item>
     </style>
 
     <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>
+        <item name="video_player_overlay">@color/transparent_gray</item>
     </style>
 
     <style name="ActionBar" parent="Widget.Sherlock.Light.ActionBar">



More information about the Android mailing list