Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c75470a authored by lbill's avatar lbill
Browse files

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
parent d26d4b3b
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -16,34 +16,36 @@

<com.android.systemui.biometrics.AuthCredentialPasswordView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:elevation="@dimen/biometric_dialog_elevation">
    android:elevation="@dimen/biometric_dialog_elevation"
    android:theme="?app:attr/lockPinPasswordStyle">

    <RelativeLayout
        android:id="@+id/auth_credential_header"
        style="@style/AuthCredentialHeaderStyle"
        style="?headerStyle"
        android:layout_width="wrap_content"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/icon"
            style="@style/TextAppearance.AuthNonBioCredential.Icon"
            style="?headerIconStyle"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:contentDescription="@null"/>

        <TextView
            android:id="@+id/title"
            style="@style/TextAppearance.AuthNonBioCredential.Title"
            style="?titleTextAppearance"
            android:layout_below="@id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/subtitle"
            style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
            style="?subTitleTextAppearance"
            android:layout_below="@id/title"
            android:layout_alignParentLeft="true"
            android:layout_width="wrap_content"
@@ -51,7 +53,7 @@

        <TextView
            android:id="@+id/description"
            style="@style/TextAppearance.AuthNonBioCredential.Description"
            style="?descriptionTextAppearance"
            android:layout_below="@id/subtitle"
            android:layout_alignParentLeft="true"
            android:layout_width="wrap_content"
@@ -67,7 +69,7 @@

        <ImeAwareEditText
            android:id="@+id/lockPassword"
            style="@style/TextAppearance.AuthCredential.PasswordEntry"
            style="?passwordTextAppearance"
            android:layout_width="208dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
@@ -77,7 +79,7 @@

        <TextView
            android:id="@+id/error"
            style="@style/TextAppearance.AuthNonBioCredential.Error"
            style="?errorTextAppearance"
            android:layout_gravity="center"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
+41 −61
Original line number Diff line number Diff line
@@ -16,91 +16,71 @@

<com.android.systemui.biometrics.AuthCredentialPatternView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:elevation="@dimen/biometric_dialog_elevation">
    android:elevation="@dimen/biometric_dialog_elevation"
    android:theme="?app:attr/lockPatternStyle">

    <LinearLayout
    <RelativeLayout
        android:id="@+id/auth_credential_header"
        style="?headerStyle"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">

        <Space
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="1"/>
        android:layout_weight="1">

        <ImageView
            android:id="@+id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
            style="?headerIconStyle"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:contentDescription="@null"/>

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.AuthCredential.Title"/>
            style="?titleTextAppearance"
            android:layout_below="@id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <TextView
            android:id="@+id/subtitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.AuthCredential.Subtitle"/>
            style="?subTitleTextAppearance"
            android:layout_below="@id/title"
            android:layout_alignParentLeft="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.AuthCredential.Description"/>

        <Space
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="1"/>

        <TextView
            android:id="@+id/error"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.AuthCredential.Error"/>

        <Space
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="1"/>

    </LinearLayout>
            style="?descriptionTextAppearance"
            android:layout_below="@id/subtitle"
            android:layout_alignParentLeft="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:gravity="center"
        android:paddingLeft="0dp"
        android:paddingRight="0dp"
        android:paddingTop="0dp"
        android:paddingBottom="16dp"
        android:clipToPadding="false">
    </RelativeLayout>

    <FrameLayout
            android:layout_width="wrap_content"
            android:layout_height="0dp"
        android:layout_weight="1"
            style="@style/LockPatternContainerStyle">
        style="?containerStyle"
        android:layout_width="0dp"
        android:layout_height="match_parent">

        <com.android.internal.widget.LockPatternView
            android:id="@+id/lockPattern"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
            android:layout_gravity="center"
                style="@style/LockPatternStyleBiometricPrompt"/>
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

        </FrameLayout>
        <TextView
            android:id="@+id/error"
            style="?errorTextAppearance"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal|bottom"/>

    </LinearLayout>
    </FrameLayout>

</com.android.systemui.biometrics.AuthCredentialPatternView>
 No newline at end of file
+10 −8
Original line number Diff line number Diff line
@@ -16,41 +16,43 @@

<com.android.systemui.biometrics.AuthCredentialPasswordView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:elevation="@dimen/biometric_dialog_elevation"
    android:orientation="vertical">
    android:orientation="vertical"
    android:theme="?app:attr/lockPinPasswordStyle">

    <RelativeLayout
        android:id="@+id/auth_credential_header"
        style="@style/AuthCredentialHeaderStyle"
        style="?headerStyle"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/icon"
            style="@style/TextAppearance.AuthNonBioCredential.Icon"
            style="?headerIconStyle"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:contentDescription="@null"/>

        <TextView
            android:id="@+id/title"
            style="@style/TextAppearance.AuthNonBioCredential.Title"
            style="?titleTextAppearance"
            android:layout_below="@id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <TextView
            android:id="@+id/subtitle"
            style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
            style="?subTitleTextAppearance"
            android:layout_below="@id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <TextView
            android:id="@+id/description"
            style="@style/TextAppearance.AuthNonBioCredential.Description"
            style="?descriptionTextAppearance"
            android:layout_below="@id/subtitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
@@ -64,7 +66,7 @@

        <ImeAwareEditText
            android:id="@+id/lockPassword"
            style="@style/TextAppearance.AuthCredential.PasswordEntry"
            style="?passwordTextAppearance"
            android:layout_width="208dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
@@ -74,7 +76,7 @@

        <TextView
            android:id="@+id/error"
            style="@style/TextAppearance.AuthNonBioCredential.Error"
            style="?errorTextAppearance"
            android:layout_gravity="center_horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
+49 −70
Original line number Diff line number Diff line
@@ -16,87 +16,66 @@

<com.android.systemui.biometrics.AuthCredentialPatternView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:gravity="center_horizontal"
    android:elevation="@dimen/biometric_dialog_elevation">
    android:elevation="@dimen/biometric_dialog_elevation"
    android:theme="?app:attr/lockPatternStyle">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
        android:id="@+id/auth_credential_header"
            style="@style/AuthCredentialHeaderStyle"
        style="?headerStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ImageView
            android:id="@+id/icon"
                android:layout_width="48dp"
                android:layout_height="48dp"
            style="?headerIconStyle"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:contentDescription="@null"/>

        <TextView
            android:id="@+id/title"
                style="@style/TextAppearance.AuthNonBioCredential.Title"
            style="?titleTextAppearance"
            android:layout_below="@id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <TextView
            android:id="@+id/subtitle"
                style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
            style="?subTitleTextAppearance"
            android:layout_below="@id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <TextView
            android:id="@+id/description"
                style="@style/TextAppearance.AuthNonBioCredential.Description"
            style="?descriptionTextAppearance"
            android:layout_below="@id/subtitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/auth_credential_header"
            android:gravity="center"
            android:orientation="vertical"
            android:paddingBottom="16dp"
            android:paddingTop="60dp">
    </RelativeLayout>

    <FrameLayout
                style="@style/LockPatternContainerStyle"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:layout_weight="1">
        android:id="@+id/auth_credential_container"
        style="?containerStyle"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.android.internal.widget.LockPatternView
            android:id="@+id/lockPattern"
                    style="@style/LockPatternStyle"
            android:layout_gravity="center"
            android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_gravity="center" />

            </FrameLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true">
            android:layout_height="match_parent"/>

        <TextView
            android:id="@+id/error"
                style="@style/TextAppearance.AuthNonBioCredential.Error"
            style="?errorTextAppearance"
            android:layout_width="match_parent"
                android:layout_height="wrap_content" />

        </LinearLayout>

    </RelativeLayout>
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal|bottom"/>
    </FrameLayout>

</com.android.systemui.biometrics.AuthCredentialPatternView>
 No newline at end of file
+30 −1
Original line number Diff line number Diff line
@@ -24,7 +24,36 @@
        <item name="android:paddingEnd">24dp</item>
        <item name="android:paddingTop">48dp</item>
        <item name="android:paddingBottom">10dp</item>
        <item name="android:gravity">top|center_horizontal</item>
        <item name="android:gravity">top|left</item>
    </style>

    <style name="AuthCredentialPatternContainerStyle">
        <item name="android:gravity">center</item>
        <item name="android:maxHeight">320dp</item>
        <item name="android:maxWidth">320dp</item>
        <item name="android:minHeight">200dp</item>
        <item name="android:minWidth">200dp</item>
        <item name="android:paddingHorizontal">60dp</item>
        <item name="android:paddingVertical">20dp</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Title">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:layout_marginTop">6dp</item>
        <item name="android:textSize">36dp</item>
        <item name="android:focusable">true</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Subtitle">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:layout_marginTop">6dp</item>
        <item name="android:textSize">18sp</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Description">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:layout_marginTop">6dp</item>
        <item name="android:textSize">18sp</item>
    </style>

</resources>
Loading