[Android] Use a style for the about screen title

Nicolas Pomepuy git at videolan.org
Tue Jan 18 12:23:24 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Dec 14 08:49:24 2021 +0100| [5a3e3cf911d8daf55efb1a9c9e7b8ee502ebd743] | committer: Nicolas Pomepuy

Use a style for the about screen title

> https://code.videolan.org/videolan/vlc-android/commit/5a3e3cf911d8daf55efb1a9c9e7b8ee502ebd743
---

 application/vlc-android/res/layout/about.xml  | 27 +++++++--------------------
 application/vlc-android/res/values/styles.xml |  8 ++++++++
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/application/vlc-android/res/layout/about.xml b/application/vlc-android/res/layout/about.xml
index 884247920..5f465f0af 100644
--- a/application/vlc-android/res/layout/about.xml
+++ b/application/vlc-android/res/layout/about.xml
@@ -82,9 +82,8 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="16dp"
-                        android:fontFamily="sans-serif-medium"
+                        style="@style/About.Title"
                         android:textColor="?attr/about_text_primary"
-                        android:textSize="16sp"
                         app:layout_constraintBottom_toBottomOf="parent"
                         app:layout_constraintStart_toStartOf="parent"
                         app:layout_constraintTop_toTopOf="parent"
@@ -212,10 +211,8 @@
                         android:layout_marginStart="24dp"
                         android:layout_marginEnd="16dp"
                         android:layout_weight="1"
-                        android:fontFamily="sans-serif-medium"
                         android:text="@string/official_website"
-                        android:textColor="?attr/font_default"
-                        android:textSize="16sp"
+                        style="@style/About.Title"
                         app:layout_constraintBottom_toBottomOf="@+id/imageView16"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toEndOf="@+id/imageView16"
@@ -265,10 +262,8 @@
                         android:layout_marginStart="24dp"
                         android:layout_marginEnd="16dp"
                         android:layout_weight="1"
-                        android:fontFamily="sans-serif-medium"
                         android:text="@string/feedback_forum"
-                        android:textColor="?attr/font_default"
-                        android:textSize="16sp"
+                        style="@style/About.Title"
                         app:layout_constraintBottom_toBottomOf="@+id/forum_icon"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintHorizontal_bias="0.0"
@@ -319,10 +314,8 @@
                         android:layout_marginStart="24dp"
                         android:layout_marginEnd="16dp"
                         android:layout_weight="1"
-                        android:fontFamily="sans-serif-medium"
                         android:text="@string/sources"
-                        android:textColor="?attr/font_default"
-                        android:textSize="16sp"
+                        style="@style/About.Title"
                         app:layout_constraintBottom_toBottomOf="@+id/sources_icon"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toEndOf="@+id/sources_icon"
@@ -371,10 +364,8 @@
                         android:layout_marginStart="24dp"
                         android:layout_marginEnd="16dp"
                         android:layout_weight="1"
-                        android:fontFamily="sans-serif-medium"
                         android:text="@string/libraries"
-                        android:textColor="?attr/font_default"
-                        android:textSize="16sp"
+                        style="@style/About.Title"
                         app:layout_constraintBottom_toBottomOf="@+id/libraries_icon"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toEndOf="@+id/libraries_icon"
@@ -423,10 +414,8 @@
                         android:layout_marginStart="24dp"
                         android:layout_marginEnd="16dp"
                         android:layout_weight="1"
-                        android:fontFamily="sans-serif-medium"
                         android:text="@string/authors"
-                        android:textColor="?attr/font_default"
-                        android:textSize="16sp"
+                        style="@style/About.Title"
                         app:layout_constraintBottom_toBottomOf="@+id/authors_icon"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toEndOf="@+id/authors_icon"
@@ -467,10 +456,8 @@
                         android:layout_marginTop="16dp"
                         android:layout_marginEnd="16dp"
                         android:layout_marginBottom="2dp"
-                        android:fontFamily="sans-serif-medium"
                         android:text="@string/about_copyright"
-                        android:textColor="?attr/font_default"
-                        android:textSize="16sp"
+                        style="@style/About.Title"
                         app:layout_constraintBottom_toTopOf="@+id/license"
                         app:layout_constraintEnd_toEndOf="parent"
                         app:layout_constraintStart_toStartOf="parent"
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 68eb07c56..3b119f997 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -724,4 +724,12 @@
 
     </style>
 
+        <style name="About"/>
+        <style name="About.Title">
+            <item name="android:textSize">16sp</item>
+            <item name="android:textColor">?attr/font_default</item>
+            <item name="android:fontFamily">sans-serif-medium</item>
+
+        </style>
+
 </resources>



More information about the Android mailing list