mirror of
https://github.com/bitwarden/android.git
synced 2024-11-28 06:04:16 +03:00
BIT-858: Update LandingScreen paddings to accommodate updated switch element (#116)
This commit is contained in:
parent
b0b64178f7
commit
e167d7635c
1 changed files with 26 additions and 13 deletions
|
@ -75,20 +75,23 @@ fun LandingScreen(
|
||||||
.semantics { testTagsAsResourceId = true }
|
.semantics { testTagsAsResourceId = true }
|
||||||
.background(MaterialTheme.colorScheme.surface)
|
.background(MaterialTheme.colorScheme.surface)
|
||||||
.fillMaxHeight()
|
.fillMaxHeight()
|
||||||
.padding(horizontal = 16.dp)
|
|
||||||
.verticalScroll(scrollState),
|
.verticalScroll(scrollState),
|
||||||
) {
|
) {
|
||||||
|
Spacer(modifier = Modifier.height(40.dp))
|
||||||
|
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.drawable.logo),
|
painter = painterResource(id = R.drawable.logo),
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.primary),
|
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.primary),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(top = 40.dp, bottom = 8.dp)
|
.padding(horizontal = 16.dp)
|
||||||
.width(220.dp)
|
.width(220.dp)
|
||||||
.height(74.dp)
|
.height(74.dp)
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
|
@ -97,19 +100,21 @@ fun LandingScreen(
|
||||||
style = MaterialTheme.typography.headlineSmall,
|
style = MaterialTheme.typography.headlineSmall,
|
||||||
color = MaterialTheme.colorScheme.onSurface,
|
color = MaterialTheme.colorScheme.onSurface,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(8.dp)
|
.padding(
|
||||||
|
horizontal = 24.dp,
|
||||||
|
vertical = 8.dp,
|
||||||
|
)
|
||||||
.wrapContentHeight(),
|
.wrapContentHeight(),
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(32.dp))
|
||||||
|
|
||||||
BitwardenTextField(
|
BitwardenTextField(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.semantics { testTag = "EmailAddressEntry" }
|
.semantics { testTag = "EmailAddressEntry" }
|
||||||
.padding(
|
.padding(horizontal = 16.dp)
|
||||||
top = 32.dp,
|
|
||||||
bottom = 10.dp,
|
|
||||||
)
|
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
value = state.emailInput,
|
value = state.emailInput,
|
||||||
onValueChange = remember(viewModel) {
|
onValueChange = remember(viewModel) {
|
||||||
|
@ -118,6 +123,8 @@ fun LandingScreen(
|
||||||
label = stringResource(id = R.string.email_address),
|
label = stringResource(id = R.string.email_address),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(10.dp))
|
||||||
|
|
||||||
RegionSelector(
|
RegionSelector(
|
||||||
selectedOption = state.selectedRegion,
|
selectedOption = state.selectedRegion,
|
||||||
onOptionSelected = remember(viewModel) {
|
onOptionSelected = remember(viewModel) {
|
||||||
|
@ -125,9 +132,12 @@ fun LandingScreen(
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.semantics { testTag = "RegionSelectorDropdown" }
|
.semantics { testTag = "RegionSelectorDropdown" }
|
||||||
|
.padding(horizontal = 16.dp)
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
BitwardenSwitch(
|
BitwardenSwitch(
|
||||||
label = stringResource(id = R.string.remember_me),
|
label = stringResource(id = R.string.remember_me),
|
||||||
isChecked = state.isRememberMeEnabled,
|
isChecked = state.isRememberMeEnabled,
|
||||||
|
@ -136,10 +146,12 @@ fun LandingScreen(
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.semantics { testTag = "RememberMeSwitch" }
|
.semantics { testTag = "RememberMeSwitch" }
|
||||||
.padding(top = 8.dp)
|
.padding(horizontal = 16.dp)
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(32.dp))
|
||||||
|
|
||||||
BitwardenFilledButton(
|
BitwardenFilledButton(
|
||||||
label = stringResource(id = R.string.continue_text),
|
label = stringResource(id = R.string.continue_text),
|
||||||
onClick = remember(viewModel) {
|
onClick = remember(viewModel) {
|
||||||
|
@ -148,18 +160,17 @@ fun LandingScreen(
|
||||||
isEnabled = state.isContinueButtonEnabled,
|
isEnabled = state.isContinueButtonEnabled,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.semantics { testTag = "ContinueButton" }
|
.semantics { testTag = "ContinueButton" }
|
||||||
.padding(top = 32.dp)
|
.padding(horizontal = 16.dp)
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.Center,
|
horizontalArrangement = Arrangement.Center,
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(
|
.padding(horizontal = 16.dp)
|
||||||
top = 8.dp,
|
|
||||||
bottom = 58.dp,
|
|
||||||
)
|
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.wrapContentHeight(),
|
.wrapContentHeight(),
|
||||||
) {
|
) {
|
||||||
|
@ -178,6 +189,8 @@ fun LandingScreen(
|
||||||
.semantics { testTag = "CreateAccountLabel" },
|
.semantics { testTag = "CreateAccountLabel" },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(58.dp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue