[Android] Navigation view : fix color
Alexandre Perraud
git at videolan.org
Fri Nov 6 13:37:51 CET 2015
vlc-ports/android | branch: playlist | Alexandre Perraud <4leyx4ndre at gmail.com> | Wed Nov 4 16:56:41 2015 +0100| [c0fae069cf5d9378c12df7d8c8e902d8f8573ab7] | committer: Geoffrey Métais
Navigation view : fix color
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c0fae069cf5d9378c12df7d8c8e902d8f8573ab7
---
vlc-android/res/color/navigationview_color.xml | 5 +++++
vlc-android/res/color/navigationview_color_dark.xml | 5 +++++
vlc-android/res/layout/main.xml | 4 +++-
vlc-android/res/values/attrs.xml | 1 +
vlc-android/res/values/styles.xml | 2 ++
5 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/vlc-android/res/color/navigationview_color.xml b/vlc-android/res/color/navigationview_color.xml
new file mode 100644
index 0000000..2416873
--- /dev/null
+++ b/vlc-android/res/color/navigationview_color.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@color/grey900" android:state_checked="true"/>
+ <item android:color="@color/grey600" />
+</selector>
\ No newline at end of file
diff --git a/vlc-android/res/color/navigationview_color_dark.xml b/vlc-android/res/color/navigationview_color_dark.xml
new file mode 100644
index 0000000..16999e5
--- /dev/null
+++ b/vlc-android/res/color/navigationview_color_dark.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@color/grey50" android:state_checked="true"/>
+ <item android:color="@color/grey400" />
+</selector>
\ No newline at end of file
diff --git a/vlc-android/res/layout/main.xml b/vlc-android/res/layout/main.xml
index 9235993..a92d49e 100644
--- a/vlc-android/res/layout/main.xml
+++ b/vlc-android/res/layout/main.xml
@@ -83,7 +83,9 @@
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize"
android:layout_gravity="start"
- app:menu="@menu/navigation" />
+ app:menu="@menu/navigation"
+ app:itemTextColor="?attr/navigationview_color"
+ app:itemIconTint="?attr/navigationview_color" />
</org.videolan.vlc.widget.HackyDrawerLayout>
diff --git a/vlc-android/res/values/attrs.xml b/vlc-android/res/values/attrs.xml
index 17b7175..510a6f0 100644
--- a/vlc-android/res/values/attrs.xml
+++ b/vlc-android/res/values/attrs.xml
@@ -15,6 +15,7 @@
<attr name="font_light" format="reference|color" />
<attr name="font_actionbar" format="reference|color" />
<attr name="font_actionbar_selected" format="reference|color" />
+ <attr name="navigationview_color" format="reference|color" />
<attr name="video_player_overlay" format="reference|color" />
<attr name="status_bar_overlay" format="reference|color" />
<attr name="advanced_options_divider" format="reference|color" />
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 730993f..fed0621 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -37,6 +37,7 @@
<item name="font_light">@color/grey600</item>
<item name="font_actionbar">@color/orange200</item>
<item name="font_actionbar_selected">@color/grey50</item>
+ <item name="navigationview_color">@color/navigationview_color</item>
<item name="list_menu">@color/grey600</item>
<item name="list_subtitle">@color/list_subtitle</item>
<item name="list_title_last">@color/list_title_last</item>
@@ -131,6 +132,7 @@
<item name="font_light">@color/grey600</item>
<item name="font_actionbar">@color/grey600</item>
<item name="font_actionbar_selected">@color/grey200</item>
+ <item name="navigationview_color">@color/navigationview_color_dark</item>
<item name="list_menu">@color/grey50</item>
<item name="list_subtitle">@color/grey400</item>
<item name="list_title_last">@color/list_title_last</item>
More information about the Android
mailing list