Skip to content

Instantly share code, notes, and snippets.

@tfaki
Created October 24, 2022 11:08
Show Gist options
  • Save tfaki/53f73ef3fbef8c50057e7f89d367da13 to your computer and use it in GitHub Desktop.
Save tfaki/53f73ef3fbef8c50057e7f89d367da13 to your computer and use it in GitHub Desktop.
@Composable
fun CardItem() {
Card(
modifier = Modifier
.fillMaxWidth()
.height(100.dp)
.padding(horizontal = 16.dp, vertical = 8.dp),
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.primary)
) {
Row(
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
Icon(
Icons.Filled.Face,
contentDescription = "face"
)
Column {
Text(
text = "Title",
style = TextStyle(color = MaterialTheme.colorScheme.onPrimary)
)
Text(
text = "Description",
style = TextStyle(color = MaterialTheme.colorScheme.onPrimary)
)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment