[CredManUi] Padding between credential card & subheader 8dp

Test: manual (see bug for screenshots)
Bug: 271168327
Change-Id: I2c52e576c47211478a4f366a12aaa505c9826f7f
This commit is contained in:
Helen Qin
2023-03-10 20:08:41 +00:00
parent 4b2b7800ec
commit a3456179ca
4 changed files with 7 additions and 4 deletions

View File

@@ -50,6 +50,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.android.credentialmanager.R
import com.android.credentialmanager.ui.theme.EntryShape
@@ -315,6 +316,7 @@ fun CtaButtonRow(
fun MoreOptionTopAppBar(
text: String,
onNavigationIconClicked: () -> Unit,
bottomPadding: Dp,
) {
TopAppBar(
title = {
@@ -341,6 +343,6 @@ fun MoreOptionTopAppBar(
}
},
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent),
modifier = Modifier.padding(top = 12.dp, bottom = 8.dp)
modifier = Modifier.padding(top = 12.dp, bottom = bottomPadding)
)
}

View File

@@ -38,7 +38,7 @@ fun MoreAboutPasskeySectionHeader(text: String) {
@Composable
private fun InternalSectionHeader(text: String, color: Color) {
Row(modifier = Modifier.fillMaxWidth().wrapContentHeight()) {
Row(modifier = Modifier.fillMaxWidth().wrapContentHeight().padding(top = 8.dp)) {
SectionHeaderText(
text,
modifier = Modifier.padding(top = 20.dp, bottom = 8.dp),

View File

@@ -371,9 +371,9 @@ fun MoreOptionsSelectionCard(
onNavigationIconClicked =
if (isFromProviderSelection) onBackProviderSelectionButtonSelected
else onBackCreationSelectionButtonSelected,
bottomPadding = 16.dp,
)
}) {
item { Divider(thickness = 8.dp, color = Color.Transparent) } // Top app bar has a 8dp
// bottom padding already
item {
CredentialContainerCard {
@@ -617,9 +617,9 @@ fun MoreAboutPasskeysIntroCard(
MoreOptionTopAppBar(
text = stringResource(R.string.more_about_passkeys_title),
onNavigationIconClicked = onBackPasskeyIntroButtonSelected,
bottomPadding = 0.dp,
)
},
contentVerticalArrangement = Arrangement.spacedBy(8.dp)
) {
item {
MoreAboutPasskeySectionHeader(

View File

@@ -287,6 +287,7 @@ fun AllSignInOptionCard(
MoreOptionTopAppBar(
text = stringResource(R.string.get_dialog_title_sign_in_options),
onNavigationIconClicked = if (isNoAccount) onCancel else onBackButtonClicked,
bottomPadding = 0.dp,
)
}) {
// For username