From 3c75470adaa0cb8ad6d19232a6783c18ebfd3e28 Mon Sep 17 00:00:00 2001 From: lbill Date: Mon, 29 Aug 2022 22:41:50 +0000 Subject: [PATCH] Polish biometric credential pattern view layouts 1. Integrate attrs and theme(style) for auth credential layouts Polish lock pattern layout style and align settings. 2. sw720dp used for large screen tablet 3. sw600dp used when display size change to largest Bug: 243699695 Test: Manual, setup auth credential pattern layout Test: atest com.android.systemui.biometrics Change-Id: I66c951e51afaf9f9c7df13443de27c334223a71a --- .../auth_credential_password_view.xml | 18 +-- .../auth_credential_pattern_view.xml | 104 ++++++--------- .../layout/auth_credential_password_view.xml | 18 +-- .../layout/auth_credential_pattern_view.xml | 121 ++++++++---------- packages/SystemUI/res/values-land/styles.xml | 31 ++++- .../res/values-sw600dp-land/styles.xml | 47 +++++++ .../res/values-sw600dp-port/styles.xml | 44 +++++++ .../res/values-sw720dp-land/styles.xml | 48 +++++++ .../res/values-sw720dp-port/styles.xml | 44 +++++++ packages/SystemUI/res/values/attrs.xml | 13 ++ packages/SystemUI/res/values/styles.xml | 77 +++++++---- 11 files changed, 388 insertions(+), 177 deletions(-) create mode 100644 packages/SystemUI/res/values-sw600dp-land/styles.xml create mode 100644 packages/SystemUI/res/values-sw600dp-port/styles.xml create mode 100644 packages/SystemUI/res/values-sw720dp-land/styles.xml create mode 100644 packages/SystemUI/res/values-sw720dp-port/styles.xml 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 bc8e540cb6129..a4d4025f2d101 100644 --- a/packages/SystemUI/res/layout-land/auth_credential_password_view.xml +++ b/packages/SystemUI/res/layout-land/auth_credential_password_view.xml @@ -16,34 +16,36 @@ + android:elevation="@dimen/biometric_dialog_elevation" + android:theme="?app:attr/lockPinPasswordStyle"> diff --git a/packages/SystemUI/res/layout-land/auth_credential_pattern_view.xml b/packages/SystemUI/res/layout-land/auth_credential_pattern_view.xml index 19a85fec13973..a3dd334bd667a 100644 --- a/packages/SystemUI/res/layout-land/auth_credential_pattern_view.xml +++ b/packages/SystemUI/res/layout-land/auth_credential_pattern_view.xml @@ -16,91 +16,71 @@ + android:elevation="@dimen/biometric_dialog_elevation" + android:theme="?app:attr/lockPatternStyle"> - - - + android:layout_weight="1"> + + - - + style="?subTitleTextAppearance" + android:layout_below="@id/title" + android:layout_alignParentLeft="true" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + style="?descriptionTextAppearance" + android:layout_below="@id/subtitle" + android:layout_alignParentLeft="true" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> - + + + + + + android:layout_gravity="center_horizontal|bottom"/> - - - - - - - - - - - - - + \ 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 75a80bc39a1f1..d9abaf2c7eac5 100644 --- a/packages/SystemUI/res/layout/auth_credential_password_view.xml +++ b/packages/SystemUI/res/layout/auth_credential_password_view.xml @@ -16,41 +16,43 @@ + android:orientation="vertical" + android:theme="?app:attr/lockPinPasswordStyle"> @@ -64,7 +66,7 @@ diff --git a/packages/SystemUI/res/layout/auth_credential_pattern_view.xml b/packages/SystemUI/res/layout/auth_credential_pattern_view.xml index dada9813c3205..4af997017bba1 100644 --- a/packages/SystemUI/res/layout/auth_credential_pattern_view.xml +++ b/packages/SystemUI/res/layout/auth_credential_pattern_view.xml @@ -16,87 +16,66 @@ + android:elevation="@dimen/biometric_dialog_elevation" + android:theme="?app:attr/lockPatternStyle"> + android:layout_height="wrap_content"> - + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + \ 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 ac9a947f44177..aefd9981d02e1 100644 --- a/packages/SystemUI/res/values-land/styles.xml +++ b/packages/SystemUI/res/values-land/styles.xml @@ -24,7 +24,36 @@ 24dp 48dp 10dp - top|center_horizontal + top|left + + + + + + + + + diff --git a/packages/SystemUI/res/values-sw600dp-land/styles.xml b/packages/SystemUI/res/values-sw600dp-land/styles.xml new file mode 100644 index 0000000000000..8148d3dfaf7dd --- /dev/null +++ b/packages/SystemUI/res/values-sw600dp-land/styles.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + diff --git a/packages/SystemUI/res/values-sw600dp-port/styles.xml b/packages/SystemUI/res/values-sw600dp-port/styles.xml new file mode 100644 index 0000000000000..771de08cb3600 --- /dev/null +++ b/packages/SystemUI/res/values-sw600dp-port/styles.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + diff --git a/packages/SystemUI/res/values-sw720dp-land/styles.xml b/packages/SystemUI/res/values-sw720dp-land/styles.xml new file mode 100644 index 0000000000000..f9ed67d89de7e --- /dev/null +++ b/packages/SystemUI/res/values-sw720dp-land/styles.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + diff --git a/packages/SystemUI/res/values-sw720dp-port/styles.xml b/packages/SystemUI/res/values-sw720dp-port/styles.xml new file mode 100644 index 0000000000000..78d299c483e6e --- /dev/null +++ b/packages/SystemUI/res/values-sw720dp-port/styles.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml index 9a71995383acb..df0659d67afee 100644 --- a/packages/SystemUI/res/values/attrs.xml +++ b/packages/SystemUI/res/values/attrs.xml @@ -191,5 +191,18 @@ + + + + + + + + + + + + + diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index a734fa744b482..887df4ade62aa 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -198,15 +198,11 @@ ?android:attr/textColorPrimary - - + + + + + + - - - + +