Merge "Adjust UI of face and fingerprint enroll intro pages" into sc-dev am: 588c13555d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15175824

Change-Id: I22328129aaf6c992aaf62c662670abe444cb3cc5
diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index 2887bca..c9c4d23 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -43,9 +43,7 @@
 
         <FrameLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="-24dp"
-            android:layout_marginBottom="4dp">
+            android:layout_height="wrap_content">
 
             <ImageView
                 style="@style/SudContentIllustration"
@@ -66,15 +64,13 @@
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/security_settings_face_enroll_introduction_info_title"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="20sp"/>
+                style="@style/BiometricEnrollIntroTitle"
+                android:text="@string/security_settings_face_enroll_introduction_info_title" />
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_glasses"
@@ -88,15 +84,13 @@
                     android:id="@+id/info_message_glasses"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage" />
             </LinearLayout>
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_looking"
@@ -110,56 +104,35 @@
                     android:id="@+id/info_message_looking"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage" />
             </LinearLayout>
 
-            <Space
-                android:layout_width="match_parent"
-                android:layout_height="40dp"/>
-
             <!-- How it works -->
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/security_settings_face_enroll_introduction_how_title"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="20sp"/>
-
-            <Space
-                android:layout_width="match_parent"
-                android:layout_height="24dp"/>
+                style="@style/BiometricEnrollIntroTitle"
+                android:text="@string/security_settings_face_enroll_introduction_how_title" />
 
             <TextView
                 android:id="@+id/how_message"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="16sp"/>
-
-            <Space
-                android:layout_width="match_parent"
-                android:layout_height="24dp"/>
+                style="@style/BiometricEnrollIntroMessage" />
 
             <!-- You're in control -->
             <TextView
                 android:id="@+id/title_in_control"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="20sp"/>
-
-            <Space
-                android:layout_width="match_parent"
-                android:layout_height="24dp"/>
+                style="@style/BiometricEnrollIntroTitle" />
 
             <TextView
                 android:id="@+id/message_in_control"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="16sp"/>
+                style="@style/BiometricEnrollIntroMessage"
+                android:paddingBottom="0dp" />
 
         </LinearLayout>
 
diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml
index 5f82879..d4914e6 100644
--- a/res/layout/fingerprint_enroll_introduction.xml
+++ b/res/layout/fingerprint_enroll_introduction.xml
@@ -42,8 +42,7 @@
 
         <FrameLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginVertical="12dp">
+            android:layout_height="wrap_content">
 
             <ImageView
                 style="@style/SudContentIllustration"
@@ -64,15 +63,13 @@
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/security_settings_fingerprint_v2_enroll_introduction_footer_title_2"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="20sp"/>
+                style="@style/BiometricEnrollIntroTitle"
+                android:text="@string/security_settings_fingerprint_v2_enroll_introduction_footer_title_2" />
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_fingerprint"
@@ -87,15 +84,13 @@
                     android:id="@+id/footer_message_2"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage" />
             </LinearLayout>
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_device_locked"
@@ -110,27 +105,20 @@
                     android:id="@+id/footer_message_3"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage" />
             </LinearLayout>
 
-            <Space
-                android:layout_width="match_parent"
-                android:layout_height="24dp"/>
-
             <!-- You're in control -->
             <TextView
                 android:id="@+id/footer_title_1"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="20sp"/>
+                style="@style/BiometricEnrollIntroTitle" />
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_trash_can"
@@ -145,28 +133,21 @@
                     android:id="@+id/footer_message_4"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage" />
             </LinearLayout>
 
-            <Space
-                android:layout_width="match_parent"
-                android:layout_height="24dp"/>
-
             <!-- Keep in mind -->
             <TextView
                 android:id="@+id/footer_title_2"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="@string/security_settings_face_enroll_introduction_info_title"
-                android:textColor="?android:attr/textColorPrimary"
-                android:textSize="20sp"/>
+                style="@style/BiometricEnrollIntroTitle"
+                android:text="@string/security_settings_face_enroll_introduction_info_title"/>
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_info"
@@ -181,15 +162,13 @@
                     android:id="@+id/footer_message_5"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage" />
             </LinearLayout>
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:id="@+id/icon_link"
@@ -203,9 +182,9 @@
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:text="@string/security_settings_fingerprint_v2_enroll_introduction_message_learn_more"
-                    android:textColor="?android:attr/textColorPrimary"
-                    android:textSize="16sp"/>
+                    style="@style/BiometricEnrollIntroMessage"
+                    android:paddingBottom="0dp"
+                    android:text="@string/security_settings_fingerprint_v2_enroll_introduction_message_learn_more" />
             </LinearLayout>
 
         </LinearLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index e25c7fa..0c62ab7 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -398,6 +398,20 @@
         <item name="android:lineSpacingMultiplier">1.2</item>
     </style>
 
+    <style name="BiometricEnrollIntroTitle">
+        <item name="android:paddingVertical">24dp</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
+        <item name="android:textSize">20sp</item>
+    </style>
+
+    <style name="BiometricEnrollIntroMessage">
+        <item name="android:lineSpacingMultiplier">1.2</item>
+        <item name="android:paddingBottom">16dp</item>
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
+        <item name="android:textSize">16sp</item>
+    </style>
+
     <style name="RingProgressBarStyle"
            parent="android:style/Widget.Material.ProgressBar.Horizontal">
         <item name="android:indeterminate">false</item>