Skip to content

Instantly share code, notes, and snippets.

@merttoptas
Created February 9, 2022 10:18
Show Gist options
  • Save merttoptas/82b8cd36aaa00e81b9be65c9d0f00239 to your computer and use it in GitHub Desktop.
Save merttoptas/82b8cd36aaa00e81b9be65c9d0f00239 to your computer and use it in GitHub Desktop.
bloomthemescard
@Composable
fun BloomThemesCard(list: List<Theme>) {
LazyRow(
contentPadding = PaddingValues(vertical = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
items(list) { theme ->
Card(
modifier = Modifier
.size(136.dp)
.clickable { },
elevation = 5.dp,
shape = MaterialTheme.shapes.small,
) {
Column {
Image(
painter = rememberImagePainter(theme.image),
contentDescription = null,
modifier = Modifier
.fillMaxWidth()
.height(96.dp),
contentScale = ContentScale.Crop,
)
Row(
modifier = Modifier.fillMaxHeight(),
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = theme.name,
modifier = Modifier
.padding(horizontal = 16.dp),
style = MaterialTheme.typography.h2,
maxLines = 2,
)
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment