Skip to content

Instantly share code, notes, and snippets.

@ssindher11
Created January 29, 2022 07:36
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 ssindher11/6e996d45dc6318c7003d2e51c2654e68 to your computer and use it in GitHub Desktop.
Save ssindher11/6e996d45dc6318c7003d2e51c2654e68 to your computer and use it in GitHub Desktop.
val rightGuideline = createGuidelineFromStart(0.4f)
Image(
painter = painterResource(id = R.drawable.cover_image), contentDescription = null,
contentScale = ContentScale.Crop,
alignment = Alignment.Center,
modifier = Modifier
.constrainAs(coverImage) {
start.linkTo(parent.start, 24.dp)
top.linkTo(menuButton.bottom, 16.dp)
end.linkTo(rightGuideline, 16.dp)
width = Dimension.fillToConstraints
}
.aspectRatio(2f / 3f),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment