Skip to content

Instantly share code, notes, and snippets.

@rubenquadros
Created August 25, 2021 19:26
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 rubenquadros/c0ec9a51425624e2895b0203f17322c7 to your computer and use it in GitHub Desktop.
Save rubenquadros/c0ec9a51425624e2895b0203f17322c7 to your computer and use it in GitHub Desktop.
Game Image
@Composable
fun GameImage(
image: String,
modifier: Modifier = Modifier
) {
Image(
modifier =
modifier
.fillMaxWidth()
.height(300.dp)
.graphicsLayer {
clip = true
shape = BottomRoundedArcShape()
shadowElevation = 50.dp.toPx()
},
contentScale = ContentScale.Crop,
painter =
rememberImagePainter(
data = image,
builder = {
placeholder(R.drawable.app_logo)
crossfade(true)
}
),
contentDescription = "Game Image"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment