Merge "Fixed spacing on Intro & Edu screens" into qt-dev
diff --git a/res/layout/face_enroll_education.xml b/res/layout/face_enroll_education.xml
index c41c724..d7b95b6 100644
--- a/res/layout/face_enroll_education.xml
+++ b/res/layout/face_enroll_education.xml
@@ -40,16 +40,14 @@
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"
@@ -68,6 +66,10 @@
</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"
diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index 535a531..00ab443 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -43,12 +43,13 @@
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"
@@ -69,10 +70,7 @@
<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
@@ -103,7 +99,7 @@
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"
@@ -116,8 +112,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
android:paddingTop="24dp">
<ImageView
@@ -126,7 +120,7 @@
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"
diff --git a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
index d80304f..85e4acd 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
@@ -164,9 +164,11 @@
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);
}