diff options
| author | 2024-02-29 20:56:12 +0000 | |
|---|---|---|
| committer | 2024-02-29 20:56:12 +0000 | |
| commit | 708711e2a712ae30475c79252891daddbb11e7d1 (patch) | |
| tree | 39811ce7c5a3b21c96d7d9c8c8fceb59ee342d48 | |
| parent | cb5c34af4ba852aa1fbd354cba493bb97a46c47a (diff) | |
| parent | 2c1953600037cc66785a2255bf403f1dc6d4530b (diff) | |
Merge "Move provider text to body in create / save dialog" into main
| -rw-r--r-- | packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt b/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt index d24adb567bc4..4ef776099119 100644 --- a/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt +++ b/packages/CredentialManager/src/com/android/credentialmanager/createflow/CreateCredentialComponents.kt @@ -16,6 +16,7 @@ package com.android.credentialmanager.createflow +import android.credentials.flags.Flags.selectorUiImprovementsEnabled import android.text.TextUtils import androidx.activity.compose.ManagedActivityResultLauncher import androidx.activity.result.ActivityResult @@ -329,6 +330,18 @@ fun CreationSelectionCard( ) } item { Divider(thickness = 24.dp, color = Color.Transparent) } + + val footerDescription = createOptionInfo.footerDescription + if (selectorUiImprovementsEnabled()) { + if (!footerDescription.isNullOrBlank()) { + item { + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodySmallText(text = footerDescription) + } + } + item { Divider(thickness = 24.dp, color = Color.Transparent) } + } + } item { CredentialContainerCard { PrimaryCreateOptionRow( @@ -366,18 +379,19 @@ fun CreationSelectionCard( }, ) } - val footerDescription = createOptionInfo.footerDescription - if (footerDescription != null && footerDescription.length > 0) { - item { - Divider( - thickness = 1.dp, - color = LocalAndroidColorScheme.current.outlineVariant, - modifier = Modifier.padding(vertical = 16.dp) - ) - } - item { - Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { - BodySmallText(text = footerDescription) + if (!selectorUiImprovementsEnabled()) { + if (footerDescription != null && footerDescription.length > 0) { + item { + Divider( + thickness = 1.dp, + color = LocalAndroidColorScheme.current.outlineVariant, + modifier = Modifier.padding(vertical = 16.dp) + ) + } + item { + Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) { + BodySmallText(text = footerDescription) + } } } } |