[Android] Nicer fonts

Geoffrey Métais git at videolan.org
Thu Nov 6 19:08:59 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov  6 18:53:10 2014 +0100| [6cf7f206640fd7bf1e2d16ae3c1bcefe6ab9a90c] | committer: Geoffrey Métais

Nicer fonts

thiner font for Android 4.2+ (API restriction)
Title and drawer arrow back to white

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

 vlc-android/res/layout/sidebar_item.xml |    2 +-
 vlc-android/res/values-v14/styles.xml   |    8 ++------
 vlc-android/res/values-v17/styles.xml   |   17 +++++++++++++++++
 vlc-android/res/values-v19/styles.xml   |    3 +++
 vlc-android/res/values-v21/styles.xml   |    4 ++++
 vlc-android/res/values/styles.xml       |    7 ++++++-
 6 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/vlc-android/res/layout/sidebar_item.xml b/vlc-android/res/layout/sidebar_item.xml
index 3172d60..3e515dc 100644
--- a/vlc-android/res/layout/sidebar_item.xml
+++ b/vlc-android/res/layout/sidebar_item.xml
@@ -12,4 +12,4 @@
     android:padding="13dip"
     android:text="@string/title"
     android:textColor="?attr/list_menu"
-    android:textSize="20sp" />
+    android:textSize="16sp" />
diff --git a/vlc-android/res/values-v14/styles.xml b/vlc-android/res/values-v14/styles.xml
index 11ca389..f1d8796 100644
--- a/vlc-android/res/values-v14/styles.xml
+++ b/vlc-android/res/values-v14/styles.xml
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<resources>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <style name="Theme.VLC" parent="Theme.VLC.Apearance">
         <item name="actionBarStyle">@style/ActionBar</item>
         <item name="actionBarSize">50dp</item>
         <item name="windowActionBarOverlay">true</item>
         <item name="actionOverflowButtonStyle">@style/ActionBar.OverflowButton</item>
+        <item name="drawerArrowStyle">@style/ActionBar.ArrowToggle</item>
     </style>
 
     <style name="Theme.VLC.Black" parent="Theme.VLC.Apearance.Black">
@@ -15,9 +16,4 @@
         <item name="android:actionOverflowButtonStyle">@style/ActionBar.OverflowButton</item>
     </style>
 
-    <style name="ActionBar" parent="Widget.AppCompat.Light.ActionBar">
-        <item name="android:background">@drawable/actionbar_background</item>
-        <item name="android:titleTextStyle">@style/ActionBar.Text</item>
-    </style>
-
 </resources>
\ No newline at end of file
diff --git a/vlc-android/res/values-v17/styles.xml b/vlc-android/res/values-v17/styles.xml
index 151b5a8..5a15973 100644
--- a/vlc-android/res/values-v17/styles.xml
+++ b/vlc-android/res/values-v17/styles.xml
@@ -8,4 +8,21 @@
         <item name="status_bar_overlay">@android:color/transparent</item>
         <item name="advanced_options_style">@style/Theme.VLC.AdvancedOptionsBlack</item>
     </style>
+    <style name="Theme.VLC" parent="Theme.VLC.Apearance">
+        <item name="actionBarStyle">@style/ActionBar</item>
+        <item name="actionBarSize">50dp</item>
+        <item name="windowActionBarOverlay">true</item>
+        <item name="actionOverflowButtonStyle">@style/ActionBar.OverflowButton</item>
+        <item name="android:fontFamily">sans-serif-light</item>
+        <item name="android:textViewStyle">@style/RobotoTextViewStyle</item>
+        <item name="android:buttonStyle">@style/RobotoButtonStyle</item>
+        <item name="drawerArrowStyle">@style/ActionBar.ArrowToggle</item>
+    </style>
+	<style name="RobotoTextViewStyle" parent="android:Widget.TextView">
+	    <item name="android:fontFamily">sans-serif-light</item>
+	</style>
+
+	<style name="RobotoButtonStyle" parent="android:Widget.Holo.Button">
+	    <item name="android:fontFamily">sans-serif-light</item>
+	</style>
 </resources>
diff --git a/vlc-android/res/values-v19/styles.xml b/vlc-android/res/values-v19/styles.xml
index 138974b..e817582 100644
--- a/vlc-android/res/values-v19/styles.xml
+++ b/vlc-android/res/values-v19/styles.xml
@@ -4,6 +4,9 @@
         <item name="android:windowBackground">@color/black</item>
         <item name="android:windowTranslucentStatus">true</item>
         <item name="android:windowActionBarOverlay">true</item>
+        <item name="android:fontFamily">sans-serif-light</item>
+        <item name="android:textViewStyle">@style/RobotoTextViewStyle</item>
+        <item name="android:buttonStyle">@style/RobotoButtonStyle</item>
 
         <item name="video_player_overlay">@color/transparent_gray</item>
         <item name="status_bar_overlay">@android:color/transparent</item>
diff --git a/vlc-android/res/values-v21/styles.xml b/vlc-android/res/values-v21/styles.xml
index 2df89b5..1326f52 100644
--- a/vlc-android/res/values-v21/styles.xml
+++ b/vlc-android/res/values-v21/styles.xml
@@ -7,5 +7,9 @@
         <item name="windowActionBarOverlay">true</item>
         <item name="actionOverflowButtonStyle">@style/ActionBar.OverflowButton</item>
         <item name="android:statusBarColor">@color/darkorange</item>
+        <item name="android:fontFamily">sans-serif-light</item>
+        <item name="android:textViewStyle">@style/RobotoTextViewStyle</item>
+        <item name="android:buttonStyle">@style/RobotoButtonStyle</item>
+        <item name="drawerArrowStyle">@style/ActionBar.ArrowToggle</item>
     </style>
 </resources>
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index b79e879..ce1d196 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -13,6 +13,7 @@
         <item name="actionBarSize">50dp</item>
         <item name="windowActionBarOverlay">true</item>
         <item name="actionOverflowButtonStyle">@style/ActionBar.OverflowButton</item>
+        <item name="drawerArrowStyle">@style/ActionBar.ArrowToggle</item>
     </style>
 
     <style name="Theme.VLC.Apearance" parent="Theme.AppCompat.Light">
@@ -169,7 +170,11 @@
 
     <style name="ActionBar.OverflowButton">
         <item name="android:src">@drawable/ic_menu_overflow</item>
-        <item name="android:background">@drawable/abc_item_background_holo_light</item>
+        <item name="background">@drawable/abc_item_background_holo_light</item>
+    </style>
+
+    <style name="ActionBar.ArrowToggle" parent="Widget.AppCompat.DrawerArrowToggle">
+        <item name="color">@color/white</item>
     </style>
 
     <!-- Advanced options menu styles -->



More information about the Android mailing list