From f71683afb27fb46ce0399014e8fb083d3fc59785 Mon Sep 17 00:00:00 2001
From: harambasicluka <64483219+harambasicluka@users.noreply.github.com>
Date: Fri, 5 Jun 2020 15:04:57 +0200
Subject: [PATCH] Feature: Font Styles (#194)

* font styles from spec

* merge

Co-authored-by: marcmuschko <marc.muschko@sap.com>
---
 .../res/layout/fragment_test_for_a_p_i.xml    | 54 +++++++++++++++++++
 .../src/main/res/values/colors.xml            |  9 ++++
 .../src/main/res/values/styles.xml            | 45 +++++++++++++++-
 3 files changed, 107 insertions(+), 1 deletion(-)

diff --git a/Corona-Warn-App/src/main/res/layout/fragment_test_for_a_p_i.xml b/Corona-Warn-App/src/main/res/layout/fragment_test_for_a_p_i.xml
index c943bec46..ca8ce72c8 100644
--- a/Corona-Warn-App/src/main/res/layout/fragment_test_for_a_p_i.xml
+++ b/Corona-Warn-App/src/main/res/layout/fragment_test_for_a_p_i.xml
@@ -207,6 +207,60 @@
                 android:layout_marginTop="@dimen/spacing_normal"
                 android:layout_marginBottom="@dimen/spacing_normal"
                 android:text="Get Active Tracing Duration in Retention Period" />
+
+            <TextView
+                style="@style/headline4"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="headline4" />
+
+            <TextView
+                style="@style/headline5"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="headline5" />
+
+            <TextView
+                style="@style/headline6"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="headline6" />
+
+            <TextView
+                style="@style/subtitle"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="subtitle" />
+
+            <TextView
+                style="@style/subtitleMedium"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="subtitleMedium" />
+
+            <TextView
+                style="@style/body1"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="body1" />
+
+            <TextView
+                style="@style/body2"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="body2" />
+
+            <TextView
+                style="@style/body2Medium"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="body2medium" />
+
+            <TextView
+                style="@style/bodyButton"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="button" />
         </LinearLayout>
     </ScrollView>
 </layout>
\ No newline at end of file
diff --git a/Corona-Warn-App/src/main/res/values/colors.xml b/Corona-Warn-App/src/main/res/values/colors.xml
index 15257d9f4..59d07e06e 100644
--- a/Corona-Warn-App/src/main/res/values/colors.xml
+++ b/Corona-Warn-App/src/main/res/values/colors.xml
@@ -61,6 +61,15 @@
     <color name="colorGreyDisabled">#9917191A</color>
 
     <!-- Text Colors -->
+    <color name="textColorPrimary1">#17191A</color>
+    <color name="textColorPrimary2">#9917191A</color>
+    <color name="textColorPrimary3">#4D17191A</color>
+    <color name="textColorSemanticRed">#C00F2D</color>
+    <color name="textColorSemanticGreen">#2E854B</color>
+    <color name="textColorSemanticNeutral">#5D6E80</color>
+    <color name="textColorTint">#007FAD</color>
+
+    <!-- OLD Text Colors -->
     <color name="textColorPrimary">#000000</color>
     <color name="textColorSecondary">#333333</color>
     <color name="textColorLight">#ffffff</color>
diff --git a/Corona-Warn-App/src/main/res/values/styles.xml b/Corona-Warn-App/src/main/res/values/styles.xml
index accd3c509..2232a8f42 100644
--- a/Corona-Warn-App/src/main/res/values/styles.xml
+++ b/Corona-Warn-App/src/main/res/values/styles.xml
@@ -134,7 +134,50 @@
 
 
     <!-- ####################################
-                    Text
+                   Text
+    ###################################### -->
+
+    <style name="headline4" parent="@style/TextAppearance.MaterialComponents.Headline4">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+    </style>
+
+    <style name="headline5" parent="@style/TextAppearance.MaterialComponents.Headline5">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+    </style>
+
+    <style name="headline6" parent="@style/TextAppearance.MaterialComponents.Headline6">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+        <item name="android:textStyle">bold</item>
+    </style>
+
+    <style name="subtitle" parent="@style/TextAppearance.MaterialComponents.Subtitle1">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+    </style>
+
+    <style name="subtitleMedium" parent="@style/TextAppearance.MaterialComponents.Subtitle1">
+        <item name="android:textColor">@color/textColorPrimary2</item>
+    </style>
+
+    <style name="body1" parent="@style/TextAppearance.MaterialComponents.Body1">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+    </style>
+
+    <style name="body2" parent="@style/TextAppearance.MaterialComponents.Body2">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+    </style>
+
+    <style name="body2Medium" parent="@style/TextAppearance.MaterialComponents.Body2">
+        <item name="android:textColor">@color/textColorPrimary2</item>
+    </style>
+
+    <style name="bodyButton" parent="@style/TextAppearance.MaterialComponents.Button">
+        <item name="android:textColor">@color/textColorPrimary1</item>
+    </style>
+
+
+    <!-- ####################################
+                    OLD Text
+                    TODO: DELETE
     ###################################### -->
     <style name="textTitle" parent="@style/TextAppearance.AppCompat.Headline">
         <item name="android:textSize">@dimen/font_title</item>
-- 
GitLab