From d26d4b3bbb300e0e573ed6b8e652c1e9969bd299 Mon Sep 17 00:00:00 2001 From: lbill Date: Mon, 9 May 2022 09:17:16 +0000 Subject: [PATCH] Fix Auth Credential PIN layout inconsistence layout in landscape The layout of AuthCredentialPasswordView in landscape doesn't consist with layout in portrait. This change do: 1. Make layout consistence on both portrait & landscape 2. Hook IME insets change callback and refine layout size 3. Optomize layout complexity Test: atest SystemUITests Test: Update Display/Font size to largest, and trigger BioMetric prompt Bug: 230698721 Merged-In: If484225a9b75af42bc4fee4d288c67c7361a1c89 Change-Id: If484225a9b75af42bc4fee4d288c67c7361a1c89 --- .../auth_credential_password_view.xml | 90 ++++++++++----- .../layout/auth_credential_password_view.xml | 109 +++++++++--------- packages/SystemUI/res/values-land/styles.xml | 9 ++ packages/SystemUI/res/values/dimens.xml | 3 + packages/SystemUI/res/values/styles.xml | 8 +- .../AuthCredentialPasswordView.java | 82 ++++++++++++- .../biometrics/AuthCredentialView.java | 3 +- 7 files changed, 211 insertions(+), 93 deletions(-) diff --git a/packages/SystemUI/res/layout-land/auth_credential_password_view.xml b/packages/SystemUI/res/layout-land/auth_credential_password_view.xml index da76c8d0b11ac..bc8e540cb6129 100644 --- a/packages/SystemUI/res/layout-land/auth_credential_password_view.xml +++ b/packages/SystemUI/res/layout-land/auth_credential_password_view.xml @@ -18,44 +18,70 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - android:gravity="center_horizontal" + android:orientation="horizontal" android:elevation="@dimen/biometric_dialog_elevation"> - + - + - + - + - + + + + + android:orientation="vertical"> + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/auth_credential_password_view.xml b/packages/SystemUI/res/layout/auth_credential_password_view.xml index 0ff1db2ef694c..75a80bc39a1f1 100644 --- a/packages/SystemUI/res/layout/auth_credential_password_view.xml +++ b/packages/SystemUI/res/layout/auth_credential_password_view.xml @@ -22,68 +22,63 @@ android:orientation="vertical"> + android:layout_height="match_parent"> - + - + - - - - - - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/values-land/styles.xml b/packages/SystemUI/res/values-land/styles.xml index 89191984b9e8f..ac9a947f44177 100644 --- a/packages/SystemUI/res/values-land/styles.xml +++ b/packages/SystemUI/res/values-land/styles.xml @@ -18,4 +18,13 @@ + + + diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 2eebdc61186c6..97cc45c9169cd 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -949,6 +949,9 @@ 240dp 240dp + + 48dp + 0 diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 9466a8c4eacbe..a734fa744b482 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -198,6 +198,11 @@ ?android:attr/textColorPrimary + +