From 2c174f5a1609fba63d7a5db09463eecc9d5b8545 Mon Sep 17 00:00:00 2001 From: Helen Qin Date: Thu, 30 Mar 2023 19:59:30 +0000 Subject: [PATCH] [CredManUi] Enforce left-align on several texts. Bug: 275119058 Test: manual Change-Id: I91f511f17d3e4688b9abba4091ab016b86c0092b --- .../createflow/CreateCredentialComponents.kt | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt b/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt index 7b98049b51c0f..ed4cc959543b4 100644 --- a/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt +++ b/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt @@ -296,7 +296,11 @@ fun ProviderSelectionCard( } item { Divider(thickness = 24.dp, color = Color.Transparent) } - item { BodyMediumText(text = stringResource(R.string.choose_provider_body)) } + item { + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodyMediumText(text = stringResource(R.string.choose_provider_body)) + } + } item { Divider(thickness = 16.dp, color = Color.Transparent) } item { CredentialContainerCard { @@ -444,8 +448,10 @@ fun MoreOptionsRowIntroCard( } item { Divider(thickness = 24.dp, color = Color.Transparent) } item { - BodyMediumText(text = stringResource( - R.string.use_provider_for_all_description, entryInfo.userProviderDisplayName)) + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodyMediumText(text = stringResource( + R.string.use_provider_for_all_description, entryInfo.userProviderDisplayName)) + } } item { Divider(thickness = 24.dp, color = Color.Transparent) } item { @@ -626,25 +632,33 @@ fun MoreAboutPasskeysIntroCard( MoreAboutPasskeySectionHeader( text = stringResource(R.string.passwordless_technology_title) ) - BodyMediumText(text = stringResource(R.string.passwordless_technology_detail)) + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodyMediumText(text = stringResource(R.string.passwordless_technology_detail)) + } } item { MoreAboutPasskeySectionHeader( text = stringResource(R.string.public_key_cryptography_title) ) - BodyMediumText(text = stringResource(R.string.public_key_cryptography_detail)) + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodyMediumText(text = stringResource(R.string.public_key_cryptography_detail)) + } } item { MoreAboutPasskeySectionHeader( text = stringResource(R.string.improved_account_security_title) ) - BodyMediumText(text = stringResource(R.string.improved_account_security_detail)) + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodyMediumText(text = stringResource(R.string.improved_account_security_detail)) + } } item { MoreAboutPasskeySectionHeader( text = stringResource(R.string.seamless_transition_title) ) - BodyMediumText(text = stringResource(R.string.seamless_transition_detail)) + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodyMediumText(text = stringResource(R.string.seamless_transition_detail)) + } } } onLog(CreateCredentialEvent.CREDMAN_CREATE_CRED_MORE_ABOUT_PASSKEYS_INTRO)