OSDN Git Service

Fixed spacing on Intro & Edu screens
authorjoshmccloskey <joshmccloskey@google.com>
Thu, 9 May 2019 23:01:13 +0000 (16:01 -0700)
committerJoshua Mccloskey <joshmccloskey@google.com>
Sat, 11 May 2019 00:11:02 +0000 (00:11 +0000)
Test: It builds.
Fixes: 132370812
Change-Id: I7bfa8a7eae91ad9b0fc9b19c9a6bc019f884e729

res/layout/face_enroll_education.xml
res/layout/face_enroll_introduction.xml
src/com/android/settings/biometrics/BiometricEnrollIntroduction.java

index c41c724..d7b95b6 100644 (file)
             android:textAlignment="center"
             android:text="@string/security_settings_face_enroll_education_message"/>
 
-        <com.google.android.setupdesign.view.RichTextView
-            android:id="@+id/error_text"
-            style="@style/SudDescription.Glif"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"/>
+        <Space android:layout_width="match_parent"
+               android:layout_height="0dp"
+               android:layout_weight="1"/>
 
         <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginVertical="48dp">
+            android:layout_marginVertical="12dp">
 
             <com.google.android.setupdesign.view.IllustrationVideoView
                 android:id="@+id/illustration_normal"
 
         </FrameLayout>
 
+        <Space android:layout_width="match_parent"
+               android:layout_height="0dp"
+               android:layout_weight="1"/>
+
         <!-- Contains the buttons and extra information text at the bottom -->
         <LinearLayout
             android:layout_width="match_parent"
index 535a531..00ab443 100644 (file)
             android:id="@+id/error_text"
             style="@style/SudDescription.Glif"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"/>
+            android:layout_height="wrap_content"
+            android:visibility="gone"/>
 
         <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginVertical="48dp">
+            android:layout_marginVertical="12dp">
 
             <com.google.android.setupdesign.view.IllustrationVideoView
                 android:id="@+id/illustration_normal"
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:paddingStart="16dp"
-                android:paddingEnd="16dp"
-                android:paddingTop="24dp">
+                android:orientation="horizontal">
 
                 <ImageView
                     android:layout_width="wrap_content"
@@ -80,7 +78,7 @@
                     android:background="@drawable/ic_face_enroll_introduction_shield">
                 </ImageView>
                 <Space
-                    android:layout_width="8dp"
+                    android:layout_width="24dp"
                     android:layout_height="wrap_content"/>
                 <TextView
                     android:layout_width="match_parent"
@@ -93,8 +91,6 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal"
-                android:paddingStart="16dp"
-                android:paddingEnd="16dp"
                 android:paddingTop="24dp">
 
                 <ImageView
                     android:background="@drawable/ic_face_enroll_introduction_visibility">
                 </ImageView>
                 <Space
-                    android:layout_width="8dp"
+                    android:layout_width="24dp"
                     android:layout_height="wrap_content"/>
                 <TextView
                     android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal"
-                android:paddingStart="16dp"
-                android:paddingEnd="16dp"
                 android:paddingTop="24dp">
 
                 <ImageView
                     android:background="@drawable/ic_face_enroll_introduction_people">
                 </ImageView>
                 <Space
-                    android:layout_width="8dp"
+                    android:layout_width="24dp"
                     android:layout_height="wrap_content"/>
                 <TextView
                     android:layout_width="match_parent"
index d80304f..85e4acd 100644 (file)
@@ -164,9 +164,11 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
         final int errorMsg = checkMaxEnrolled();
         if (errorMsg == 0) {
             mErrorText.setText(null);
+            mErrorText.setVisibility(View.GONE);
             getNextButton().setVisibility(View.VISIBLE);
         } else {
             mErrorText.setText(errorMsg);
+            mErrorText.setVisibility(View.VISIBLE);
             getNextButton().setText(getResources().getString(R.string.done));
             getNextButton().setVisibility(View.VISIBLE);
         }