Skip to content

Instantly share code, notes, and snippets.

@ssindher11
Created January 29, 2022 07:37
Show Gist options
  • Save ssindher11/94d545c7bc19deca06fce4f07f6f542a to your computer and use it in GitHub Desktop.
Save ssindher11/94d545c7bc19deca06fce4f07f6f542a to your computer and use it in GitHub Desktop.
Text(
text = "Deadpool",
style = MaterialTheme.typography.h4,
fontWeight = FontWeight.SemiBold,
modifier = Modifier.constrainAs(titleText) {
top.linkTo(menuButton.bottom, 8.dp)
start.linkTo(coverImage.end, 16.dp)
}
)
Text(
text = "Action | 1h 48m",
fontSize = 16.sp,
color = Color.Gray,
modifier = Modifier.constrainAs(genreText) {
top.linkTo(titleText.bottom)
start.linkTo(coverImage.end, 16.dp)
}
)
Text(
text = "IMDb 8.0/10",
fontWeight = FontWeight.Medium,
style = MaterialTheme.typography.body1,
modifier = Modifier.constrainAs(ratingText) {
top.linkTo(genreText.bottom, 16.dp)
start.linkTo(coverImage.end, 16.dp)
}
)
Text(
text = "CAST",
fontSize = 14.sp,
color = Color.Gray,
fontWeight = FontWeight.SemiBold,
modifier = Modifier.constrainAs(castText) {
bottom.linkTo(castContainer.top)
start.linkTo(coverImage.end, 16.dp)
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment