Onboarding screen tweaks
- Opposite transition when going back a step - Don't allow skipping (I don't want to deal with an unset storage location in other places)
This commit is contained in:
parent
3a0b3de175
commit
cc56fde9fe
2 changed files with 10 additions and 10 deletions
|
@ -73,8 +73,6 @@ fun OnboardingScreen(
|
|||
}
|
||||
}
|
||||
},
|
||||
rejectText = stringResource(MR.strings.onboarding_action_skip),
|
||||
onRejectClick = onComplete,
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
|
@ -87,7 +85,7 @@ fun OnboardingScreen(
|
|||
targetState = currentStep,
|
||||
transitionSpec = {
|
||||
materialSharedAxisX(
|
||||
forward = true,
|
||||
forward = targetState > initialState,
|
||||
slideDistance = slideDistance,
|
||||
)
|
||||
},
|
||||
|
|
|
@ -38,8 +38,8 @@ fun InfoScreen(
|
|||
subtitleText: String,
|
||||
acceptText: String,
|
||||
onAcceptClick: () -> Unit,
|
||||
rejectText: String,
|
||||
onRejectClick: () -> Unit,
|
||||
rejectText: String? = null,
|
||||
onRejectClick: (() -> Unit)? = null,
|
||||
content: @Composable ColumnScope.() -> Unit,
|
||||
) {
|
||||
Scaffold(
|
||||
|
@ -69,6 +69,7 @@ fun InfoScreen(
|
|||
) {
|
||||
Text(text = acceptText)
|
||||
}
|
||||
if (rejectText != null && onRejectClick != null) {
|
||||
OutlinedButton(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onClick = onRejectClick,
|
||||
|
@ -76,6 +77,7 @@ fun InfoScreen(
|
|||
Text(text = rejectText)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
) { paddingValues ->
|
||||
// Status bar scrim
|
||||
|
|
Reference in a new issue