[Android] UI : Change the card progress bar color
Alexandre Perraud
git at videolan.org
Tue Dec 16 16:23:59 CET 2014
vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Dec 16 15:41:39 2014 +0100| [a5da17d26305ea29af5b8076bf857bbbae060526] | committer: Geoffrey Métais
UI : Change the card progress bar color
Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a5da17d26305ea29af5b8076bf857bbbae060526
---
vlc-android/res/drawable/gridview_progressbar.xml | 6 ++---
.../res/drawable/gridview_progressbar_w.xml | 26 ++++++++++++++++++++
vlc-android/res/layout/video_grid_card.xml | 2 +-
vlc-android/res/layout/video_list_card.xml | 2 +-
vlc-android/res/values/attrs.xml | 3 ++-
vlc-android/res/values/colors.xml | 1 +
vlc-android/res/values/styles.xml | 3 ++-
7 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/vlc-android/res/drawable/gridview_progressbar.xml b/vlc-android/res/drawable/gridview_progressbar.xml
index 4f82abd..d2a8c10 100644
--- a/vlc-android/res/drawable/gridview_progressbar.xml
+++ b/vlc-android/res/drawable/gridview_progressbar.xml
@@ -3,14 +3,14 @@
<item android:id="@android:id/background">
<shape>
- <solid android:color="#000" />
+ <solid android:color="@color/grey900" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
- <solid android:color="#80CCCCCC" />
+ <solid android:color="@color/grey400transparent" />
</shape>
</clip>
</item>
@@ -18,7 +18,7 @@
<item android:id="@android:id/progress">
<clip>
<shape>
- <solid android:color="#F48B00" />
+ <solid android:color="@color/orange500" />
</shape>
</clip>
</item>
diff --git a/vlc-android/res/drawable/gridview_progressbar_w.xml b/vlc-android/res/drawable/gridview_progressbar_w.xml
new file mode 100644
index 0000000..b2617d8
--- /dev/null
+++ b/vlc-android/res/drawable/gridview_progressbar_w.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background">
+ <shape>
+ <solid android:color="@color/grey50" />
+ </shape>
+ </item>
+
+ <item android:id="@android:id/secondaryProgress">
+ <clip>
+ <shape>
+ <solid android:color="@color/grey400transparent" />
+ </shape>
+ </clip>
+ </item>
+
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <solid android:color="@color/orange500" />
+ </shape>
+ </clip>
+ </item>
+
+</layer-list>
\ No newline at end of file
diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index 04e74ef..ea21ab0 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -83,7 +83,7 @@
android:indeterminate="false"
android:maxHeight="3dip"
android:minHeight="3dip"
- android:progressDrawable="@drawable/gridview_progressbar" />
+ android:progressDrawable="?attr/gridview_progressbar" />
</RelativeLayout>
diff --git a/vlc-android/res/layout/video_list_card.xml b/vlc-android/res/layout/video_list_card.xml
index fe2e586..2286a1e 100644
--- a/vlc-android/res/layout/video_list_card.xml
+++ b/vlc-android/res/layout/video_list_card.xml
@@ -82,7 +82,7 @@
android:indeterminate="false"
android:maxHeight="3dip"
android:minHeight="3dip"
- android:progressDrawable="@drawable/gridview_progressbar" />
+ android:progressDrawable="?attr/gridview_progressbar" />
</RelativeLayout>
</android.support.v7.widget.CardView>
\ No newline at end of file
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index 910a3ab..1ccf0e1 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -51,7 +51,8 @@
<attr name="ic_menu_openmrl" format="reference" />
<attr name="ic_menu_preferences" format="reference" />
<attr name="ic_move_media" format="reference" />
-
+ <attr name="gridview_progressbar" format="reference" />
+
<attr name="mini_player_top_shadow" format="reference" />
<attr name="audio_playlist_shadow" format="reference" />
<attr name="header_fadein_overlay" format="reference" />
diff --git a/vlc-android/res/values/colors.xml b/vlc-android/res/values/colors.xml
index 44625d5..1edc6a8 100644
--- a/vlc-android/res/values/colors.xml
+++ b/vlc-android/res/values/colors.xml
@@ -58,6 +58,7 @@
<color name="grey900">#212121</color>
<color name="grey50transparent">#dcfafafa</color>
+ <color name="grey400transparent">#80bdbdbd</color>
<color name="grey900transparent">#80212121</color>
<color name="blacktransparent">#b4000000</color>
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index a7cccde..17b2f9e 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -70,7 +70,7 @@
<item name="ic_menu_openmrl">@drawable/ic_menu_goto</item>
<item name="ic_menu_preferences">@drawable/ic_menu_preferences</item>
<item name="ic_move_media">@drawable/ic_move_media</item>
-
+ <item name="gridview_progressbar">@drawable/gridview_progressbar_w</item>
<item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsLight</item>
</style>
@@ -137,6 +137,7 @@
<item name="ic_menu_openmrl">@drawable/ic_menu_goto_w</item>
<item name="ic_menu_preferences">@drawable/ic_menu_preferences_w</item>
<item name="ic_move_media">@drawable/ic_move_media_w</item>
+ <item name="gridview_progressbar">@drawable/gridview_progressbar</item>
<item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsBlack</item>
</style>
More information about the Android
mailing list