Вы можете использовать что-то вроде:
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MaterialTheme {
Column(
modifier = Spacing(32.dp),
crossAxisSize = LayoutSize.Expand
) {
//Card with 8dp rounded corners
Card(shape = RoundedCornerShape(8.dp)) {
//Padding inside the card
Padding(padding = 16.dp) {
// Main container inside the card with height= 200dp
Container(height = 200.dp, expanded = true) {
//Text element with custom style
Text("This is a card view",
style = +themeTextStyle { h4 })
}
}
}
}
}
}
}