Jetpack Compose CardView

November 1, 2021
@Preview
@Composable
fun CardPreview() {
    Card(
        shape = RoundedCornerShape(8.dp),
        backgroundColor = MaterialTheme.colors.surface,
        modifier = Modifier.fillMaxWidth().padding(8.dp)
    ) {
        Column(
            modifier = Modifier.padding(8.dp)
        ) {
            Text(text = "Title", style = MaterialTheme.typography.subtitle1)
            Text(text = "Content")
        }
    }
}
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.