Skip to content

Instantly share code, notes, and snippets.

@rubenquadros
Created August 24, 2021 19:44
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/8468e6dd2e23998d63d93b7e9ee53d7f to your computer and use it in GitHub Desktop.
Save rubenquadros/8468e6dd2e23998d63d93b7e9ee53d7f to your computer and use it in GitHub Desktop.
Play button
@Composable
fun PlayTrailer(
modifier: Modifier = Modifier,
openGameTrailer: () -> Unit
) {
Box(modifier = modifier) {
IconButton(onClick = openGameTrailer) {
Image(
modifier =
Modifier.width(50.dp)
.height(50.dp)
.align(Alignment.Center)
.graphicsLayer {
shadowElevation = 20.dp.toPx()
shape =
RoundedCornerShape(15.dp)
clip = true
}
.background(Color(0xFFF50057)),
painter =
painterResource(
id = R.drawable.ic_play
),
contentDescription = "Play Trailer"
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment