Merge "Update work challenge to align with material next"

This commit is contained in:
TreeHugger Robot
2022-02-02 14:35:24 +00:00
committed by Android (Google) Code Review
4 changed files with 171 additions and 115 deletions

View File

@@ -20,6 +20,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M20,6h-4L16,4c0,-1.11 -0.89,-2 -2,-2h-4c-1.11,0 -2,0.89 -2,2v2L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM14,6h-4L10,4h4v2z"
android:pathData="@*android:string/config_work_badge_path_24"
android:fillColor="?android:attr/colorAccent"/>
</vector>

View File

@@ -18,64 +18,72 @@
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">
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/title"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Title"/>
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Subtitle"/>
<LinearLayout
android:id="@+id/auth_credential_header"
style="@style/AuthCredentialHeaderStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Description"/>
<ImageView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@null" />
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:id="@+id/title"
style="@style/TextAppearance.AuthNonBioCredential.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImeAwareEditText
android:id="@+id/lockPassword"
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:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
style="@style/TextAppearance.AuthCredential.PasswordEntry"/>
<TextView
android:id="@+id/subtitle"
style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Error"/>
<TextView
android:id="@+id/description"
style="@style/TextAppearance.AuthNonBioCredential.Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="5"/>
</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"
android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
android:inputType="textPassword"
android:minHeight="48dp" />
<TextView
android:id="@+id/error"
style="@style/TextAppearance.AuthNonBioCredential.Error"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
</com.android.systemui.biometrics.AuthCredentialPasswordView>

View File

@@ -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"/>
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/title"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Title"/>
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Subtitle"/>
<LinearLayout
android:id="@+id/auth_credential_header"
style="@style/AuthCredentialHeaderStyle"
android:layout_width="match_parent"
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"/>
<ImageView
android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@null" />
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:id="@+id/title"
style="@style/TextAppearance.AuthNonBioCredential.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="16dp"
android:clipToPadding="false">
<TextView
android:id="@+id/subtitle"
style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
style="@style/LockPatternContainerStyle">
<TextView
android:id="@+id/description"
style="@style/TextAppearance.AuthNonBioCredential.Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<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"/>
</FrameLayout>
<TextView
android:id="@+id/error"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextAppearance.AuthCredential.Error"/>
android:layout_below="@id/auth_credential_header"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingTop="60dp">
</LinearLayout>
<FrameLayout
style="@style/LockPatternContainerStyle"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1">
<Space
android:layout_width="0dp"
android:layout_height="0dp"
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" />
</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.AuthNonBioCredential.Error"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
</com.android.systemui.biometrics.AuthCredentialPatternView>

View File

@@ -236,6 +236,41 @@
<item name="android:textColor">?android:attr/colorError</item>
</style>
<style name="TextAppearance.AuthNonBioCredential"
parent="@android:style/TextAppearance.DeviceDefault">
<item name="android:accessibilityLiveRegion">polite</item>
<item name="android:textAlignment">gravity</item>
<item name="android:layout_gravity">top</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextAppearance.AuthNonBioCredential.Title">
<item name="android:fontFamily">google-sans</item>
<item name="android:layout_marginTop">20dp</item>
<item name="android:textSize">36sp</item>
</style>
<style name="TextAppearance.AuthNonBioCredential.Subtitle">
<item name="android:fontFamily">google-sans</item>
<item name="android:layout_marginTop">20dp</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">20dp</item>
<item name="android:textSize">16sp</item>
</style>
<style name="TextAppearance.AuthNonBioCredential.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">
<item name="android:gravity">center</item>
<item name="android:singleLine">true</item>
@@ -243,6 +278,15 @@
<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>
@@ -307,9 +351,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">