Iterate design on on boarding screen.

This commit is contained in:
Benoit Marty 2023-07-03 12:11:55 +02:00
parent 7c6bb7a45d
commit db8a07c198
9 changed files with 67 additions and 81 deletions

View file

@ -50,6 +50,10 @@ fun OnBoardingPage(
footer: @Composable () -> Unit = {},
content: @Composable () -> Unit = {},
) {
// Note: having a night variant of R.drawable.onboarding_bg in the folder `drawable-night` is working
// at runtime, but is not in Android Studio Preview. So I prefer to handle this manually.
val isLight = ElementTheme.colors.isLight
val bgDrawableRes = if (isLight) R.drawable.onboarding_bg_light else R.drawable.onboarding_bg_dark
Box(
modifier = modifier
.fillMaxSize()
@ -58,7 +62,7 @@ fun OnBoardingPage(
Image(
modifier = Modifier
.fillMaxSize(),
painter = painterResource(id = R.drawable.onboarding_bg),
painter = painterResource(id = bgDrawableRes),
contentScale = ContentScale.Crop,
contentDescription = null,
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB