Skip to content

Instantly share code, notes, and snippets.

@pauloaapereira
Created March 16, 2021 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauloaapereira/1e57578c4001c1d76de2af2bd53b3646 to your computer and use it in GitHub Desktop.
Save pauloaapereira/1e57578c4001c1d76de2af2bd53b3646 to your computer and use it in GitHub Desktop.
Android Dev Challenge - Week 3 - Bloom - A Full Development Overview - 1
@Composable
private fun Background() {
Box(
modifier = Modifier
.fillMaxSize()
.scale(scaleX = 1.1f, scaleY = 1.3f),
contentAlignment = Alignment.Center
) {
Image(
painter = painterResource(id = if (MaterialTheme.colors.isLight) R.drawable.light_welcome_bg else R.drawable.dark_welcome_bg),
contentDescription = null
)
}
Box(
modifier = Modifier
.fillMaxHeight(.6f)
.fillMaxWidth()
.offset(x = 32.dp),
contentAlignment = Alignment.CenterEnd
) {
Image(
painter = painterResource(id = if (MaterialTheme.colors.isLight) R.drawable.light_welcome_illos else R.drawable.dark_welcome_illos),
contentDescription = null,
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment