[Android] Layouts: remove color references and remplace them by attributes
Adrien Maglo
git at videolan.org
Fri Feb 21 18:18:08 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Feb 21 18:17:36 2014 +0100| [692243f49149b1e0d61e24ed65802e8ccb28602e] | committer: Adrien Maglo
Layouts: remove color references and remplace them by attributes
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=692243f49149b1e0d61e24ed65802e8ccb28602e
---
vlc-android/res/layout/audio_browser_item.xml | 6 +++---
vlc-android/res/layout/audio_playlist_item.xml | 4 ++--
vlc-android/res/layout/audio_playlist_item_drag_shadow.xml | 4 ++--
vlc-android/res/layout/directory_view_item.xml | 4 ++--
vlc-android/res/layout/list_item.xml | 4 ++--
vlc-android/res/layout/sidebar_item.xml | 2 +-
vlc-android/res/layout/video_grid_item.xml | 4 ++--
vlc-android/res/layout/video_list_item.xml | 4 ++--
vlc-android/res/values-v11/styles.xml | 4 ++++
vlc-android/res/values/attrs.xml | 5 +++++
vlc-android/res/values/styles.xml | 4 ++++
11 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/vlc-android/res/layout/audio_browser_item.xml b/vlc-android/res/layout/audio_browser_item.xml
index ec96ef9..238c6ca 100644
--- a/vlc-android/res/layout/audio_browser_item.xml
+++ b/vlc-android/res/layout/audio_browser_item.xml
@@ -31,7 +31,7 @@
android:ellipsize="marquee"
android:maxLines="1"
android:text="@string/title"
- android:textColor="@color/list_title"
+ android:textColor="?attr/list_title"
android:textSize="20sp" />
<TextView
@@ -41,7 +41,7 @@
android:ellipsize="marquee"
android:maxLines="1"
android:text="@string/artist"
- android:textColor="@color/list_subtitle"
+ android:textColor="?attr/list_subtitle"
android:textSize="14sp" />
</LinearLayout>
@@ -59,6 +59,6 @@
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="1dp"
- android:background="@color/item_footer" />
+ android:background="?attr/item_footer" />
</LinearLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/audio_playlist_item.xml b/vlc-android/res/layout/audio_playlist_item.xml
index ab46eb0..69bffed 100644
--- a/vlc-android/res/layout/audio_playlist_item.xml
+++ b/vlc-android/res/layout/audio_playlist_item.xml
@@ -64,7 +64,7 @@
android:layout_marginTop="5dip"
android:singleLine="true"
android:text="@string/title"
- android:textColor="@color/list_title"
+ android:textColor="?attr/list_title"
android:textSize="16sp" />
<TextView
@@ -76,7 +76,7 @@
android:layout_marginRight="5dip"
android:singleLine="true"
android:text="@string/artist"
- android:textColor="@color/list_subtitle"
+ android:textColor="?attr/list_subtitle"
android:textSize="11sp" />
</LinearLayout>
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 5ab2bc1..9501177 100644
--- a/vlc-android/res/layout/audio_playlist_item_drag_shadow.xml
+++ b/vlc-android/res/layout/audio_playlist_item_drag_shadow.xml
@@ -32,7 +32,7 @@
android:layout_marginTop="5dip"
android:singleLine="true"
android:text="@string/title"
- android:textColor="@color/list_title"
+ android:textColor="?attr/list_title"
android:textSize="16sp" />
<TextView
@@ -44,7 +44,7 @@
android:layout_marginRight="5dip"
android:singleLine="true"
android:text="@string/artist"
- android:textColor="@color/list_subtitle"
+ android:textColor="?attr/list_subtitle"
android:textSize="11sp" />
</LinearLayout>
diff --git a/vlc-android/res/layout/directory_view_item.xml b/vlc-android/res/layout/directory_view_item.xml
index 89248c2..08847ee 100644
--- a/vlc-android/res/layout/directory_view_item.xml
+++ b/vlc-android/res/layout/directory_view_item.xml
@@ -29,7 +29,7 @@
android:ellipsize="marquee"
android:maxLines="1"
android:text="@string/title"
- android:textColor="@color/list_title"
+ android:textColor="?attr/list_title"
android:textSize="20sp" />
<TextView
@@ -39,7 +39,7 @@
android:ellipsize="marquee"
android:maxLines="1"
android:text="@string/artist"
- android:textColor="@color/list_subtitle"
+ android:textColor="?attr/list_subtitle"
android:textSize="14sp" />
</LinearLayout>
diff --git a/vlc-android/res/layout/list_item.xml b/vlc-android/res/layout/list_item.xml
index 144748b..eda9858 100644
--- a/vlc-android/res/layout/list_item.xml
+++ b/vlc-android/res/layout/list_item.xml
@@ -26,7 +26,7 @@
android:layout_marginRight="5dip"
android:layout_marginTop="5dip"
android:text="@string/title"
- android:textColor="@color/list_title"
+ android:textColor="?attr/list_title"
android:textSize="20sp" />
<TextView
@@ -37,7 +37,7 @@
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:text="@string/artist"
- android:textColor="@color/list_subtitle"
+ android:textColor="?attr/list_subtitle"
android:textSize="14sp" />
</LinearLayout>
diff --git a/vlc-android/res/layout/sidebar_item.xml b/vlc-android/res/layout/sidebar_item.xml
index aa9dc17..2e5dc01 100644
--- a/vlc-android/res/layout/sidebar_item.xml
+++ b/vlc-android/res/layout/sidebar_item.xml
@@ -9,6 +9,6 @@
android:padding="13dip"
android:drawableLeft="@drawable/icon"
android:text="@string/title"
- android:textColor="@color/list_menu"
+ android:textColor="?attr/list_menu"
android:textSize="20sp"
android:gravity="center" />
diff --git a/vlc-android/res/layout/video_grid_item.xml b/vlc-android/res/layout/video_grid_item.xml
index 06ed522..f515904 100644
--- a/vlc-android/res/layout/video_grid_item.xml
+++ b/vlc-android/res/layout/video_grid_item.xml
@@ -41,14 +41,14 @@
android:ellipsize="end"
android:maxLines="2"
android:textSize="12sp"
- android:textColor="@color/list_title" />
+ android:textColor="?attr/list_title" />
<TextView
android:id="@+id/ml_item_subtitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textSize="10sp"
- android:textColor="@color/list_subtitle" />
+ android:textColor="?attr/list_subtitle" />
</LinearLayout>
<ImageView
android:id="@+id/item_more"
diff --git a/vlc-android/res/layout/video_list_item.xml b/vlc-android/res/layout/video_list_item.xml
index 00037d5..8459e6f 100644
--- a/vlc-android/res/layout/video_list_item.xml
+++ b/vlc-android/res/layout/video_list_item.xml
@@ -41,14 +41,14 @@
android:ellipsize="end"
android:maxLines="2"
android:textSize="17sp"
- android:textColor="@color/list_title"
+ android:textColor="?attr/list_title"
android:paddingLeft="12dip" />
<TextView
android:id="@+id/ml_item_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
- android:textColor="@color/list_subtitle"
+ android:textColor="?attr/list_subtitle"
android:paddingLeft="12dip" />
</LinearLayout>
<ImageView
diff --git a/vlc-android/res/values-v11/styles.xml b/vlc-android/res/values-v11/styles.xml
index 486b33e..c46a236 100644
--- a/vlc-android/res/values-v11/styles.xml
+++ b/vlc-android/res/values-v11/styles.xml
@@ -24,6 +24,10 @@
<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="list_menu">@color/list_menu</item>
+ <item name="list_subtitle">@color/list_subtitle</item>
+ <item name="list_title_last">@color/list_title_last</item>
+ <item name="list_title">@color/list_title</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 a3a99a1..3454d3f 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -17,6 +17,11 @@
<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" />
+ <attr name="list_menu" format="reference|color" />
+ <attr name="list_subtitle" format="reference|color" />
+ <attr name="list_title_last" format="reference|color" />
+ <attr name="list_title" format="reference|color" />
+
<attr name="ic_speed_normal_style" format="reference" />
<attr name="ic_sleep_normal_style" format="reference" />
<attr name="ic_jumpto_normal_style" format="reference" />
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 19d0510..537a2c9 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -32,6 +32,10 @@
<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="list_menu">@color/list_menu</item>
+ <item name="list_subtitle">@color/list_subtitle</item>
+ <item name="list_title_last">@color/list_title_last</item>
+ <item name="list_title">@color/list_title</item>
<item name="android:windowBackground">@color/background_common</item>
</style>
More information about the Android
mailing list