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

Commit 352a3997 authored by Alex Johnston's avatar Alex Johnston
Browse files

Update work challenge to align with material next

Summary:
* Update title, subtitle, description and icon
* Update layout for entering credentials

Follow-up:
* There are still some UI componenets which don't
  fully align with material next. A larger
  change will need to be made to fix this, which
  we will aim to do in Android T.
* This includes the status bar and nav bar appearance
  and the password entry text field.

Pattern:
* Settings (WAI): https://screenshot.googleplex.com/BiQYeWSrkxL6iRW
* Work Challenge (after changes): https://screenshot.googleplex.com/7ThwqMpbHu8yLWg

Password/PIN:
* Settings (WAI): https://screenshot.googleplex.com/9zUMGgYBvyhYdBa
* Work Challenge (after changes): https://screenshot.googleplex.com/46SVNAzkWesyi8M

Bug: 191948779
Test: manual testing using TestDPC
Change-Id: I6cca39d447e37310c287d1a0eb0468565e9fcd37
parent 32e61218
Loading
Loading
Loading
Loading
+57 −50
Original line number Diff line number Diff line
@@ -18,64 +18,71 @@
    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:elevation="@dimen/biometric_dialog_elevation">
    android:elevation="@dimen/biometric_dialog_elevation"
    android:orientation="vertical">

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

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
        <LinearLayout
            android:id="@+id/auth_credential_header"
            style="@style/AuthCredentialHeaderStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true">

            <ImageView
                android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:contentDescription="@null" />

            <TextView
                android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Title"/>
                style="@style/TextAppearance.AuthCredential.Title"
                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="@style/TextAppearance.AuthCredential.Subtitle"
                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"/>
                style="@style/TextAppearance.AuthCredential.Description"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:orientation="vertical"
            android:layout_alignParentBottom="true">

            <ImeAwareEditText
                android:id="@+id/lockPassword"
                style="@style/TextAppearance.AuthCredential.PasswordEntry"
                android:layout_width="208dp"
                android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:minHeight="48dp"
        android:gravity="center"
        android:inputType="textPassword"
        android:maxLength="500"
                android:layout_gravity="center"
                android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
        style="@style/TextAppearance.AuthCredential.PasswordEntry"/>
                android:inputType="textPassword"
                android:minHeight="48dp" />

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

        </LinearLayout>

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

</com.android.systemui.biometrics.AuthCredentialPasswordView>
 No newline at end of file
+65 −60
Original line number Diff line number Diff line
@@ -22,76 +22,81 @@
    android:gravity="center_horizontal"
    android:elevation="@dimen/biometric_dialog_elevation">

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

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

            <ImageView
                android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:contentDescription="@null" />

            <TextView
                android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Title"/>
                style="@style/TextAppearance.AuthCredential.Title"
                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="@style/TextAppearance.AuthCredential.Subtitle"
                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"/>
                style="@style/TextAppearance.AuthCredential.Description"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </LinearLayout>

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

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

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

            </FrameLayout>

        </LinearLayout>

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

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

        </LinearLayout>

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

</com.android.systemui.biometrics.AuthCredentialPatternView>
 No newline at end of file
+27 −15
Original line number Diff line number Diff line
@@ -200,9 +200,9 @@

    <style name="TextAppearance.DeviceManagementDialog.Title" parent="@android:style/TextAppearance.DeviceDefault.DialogWindowTitle"/>

    <style name="TextAppearance.AuthCredential">
    <style name="TextAppearance.AuthCredential"
        parent="@android:style/TextAppearance.DeviceDefault">
        <item name="android:accessibilityLiveRegion">polite</item>
        <item name="android:gravity">center_horizontal</item>
        <item name="android:textAlignment">gravity</item>
        <item name="android:layout_gravity">top</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
@@ -210,44 +210,57 @@

    <style name="TextAppearance.AuthCredential.Title">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:paddingTop">12dp</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="android:textSize">24sp</item>
        <item name="android:layout_marginTop">20dp</item>
        <item name="android:textSize">36sp</item>
    </style>

    <style name="TextAppearance.AuthCredential.Subtitle">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:paddingTop">8dp</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="android:textSize">16sp</item>
        <item name="android:layout_marginTop">20dp</item>
        <item name="android:textSize">18sp</item>
    </style>

    <style name="TextAppearance.AuthCredential.Description">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:paddingTop">8dp</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="android:textSize">14sp</item>
        <item name="android:layout_marginTop">20dp</item>
        <item name="android:textSize">16sp</item>
    </style>

    <style name="TextAppearance.AuthCredential.Error">
        <item name="android:paddingTop">6dp</item>
        <item name="android:paddingBottom">18dp</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">?android:attr/colorError</item>
        <item name="android:gravity">center</item>
    </style>

    <style name="TextAppearance.AuthCredential.PasswordEntry" parent="@android:style/TextAppearance.DeviceDefault">
    <style name="TextAppearance.AuthCredential.PasswordEntry">
        <item name="android:gravity">center</item>
        <item name="android:singleLine">true</item>
        <item name="android:textColor">?android:attr/colorForeground</item>
        <item name="android:textSize">24sp</item>
    </style>

    <style name="AuthCredentialHeaderStyle">
        <item name="android:paddingStart">48dp</item>
        <item name="android:paddingEnd">24dp</item>
        <item name="android:paddingTop">28dp</item>
        <item name="android:paddingBottom">20dp</item>
        <item name="android:orientation">vertical</item>
        <item name="android:layout_gravity">top</item>
    </style>

    <style name="DeviceManagementDialogTitle">
        <item name="android:gravity">center</item>
        <item name="android:textAppearance">@style/TextAppearance.DeviceManagementDialog.Title</item>
    </style>

    <style name="AuthCredentialPasswordTheme" parent="@style/Theme.MaterialComponents.DayNight">
        <item name="colorPrimary">?android:attr/colorPrimary</item>
        <item name="colorPrimaryDark">?android:attr/colorPrimary</item>
    </style>

    <style name="TextAppearance.DeviceManagementDialog.Content" parent="@*android:style/TextAppearance.DeviceDefault.Subhead"/>

    <style name="BaseBrightnessDialogContainer" parent="@style/Theme.SystemUI">
@@ -307,9 +320,8 @@
        <item name="android:maxWidth">420dp</item>
        <item name="android:minHeight">0dp</item>
        <item name="android:minWidth">0dp</item>
        <item name="android:paddingBottom">0dp</item>
        <item name="android:paddingHorizontal">44dp</item>
        <item name="android:paddingTop">0dp</item>
        <item name="android:paddingHorizontal">60dp</item>
        <item name="android:paddingBottom">40dp</item>
    </style>

    <style name="LockPatternStyle">