I'm trying this compose :
@Composable
fun Card(text: String, imageVector: ImageVector) {
androidx.compose.material.Card(
modifier = Modifier.padding(4.dp)
) {
Row(
modifier = Modifier
.fillMaxSize()
.background(Color.Green)
) {
Image(
imageVector, contentDescription = null, modifier = Modifier
.padding(20.dp)
.size(96.dp)
)
Column(
modifier = Modifier
.fillMaxHeight()
.background(Color.DarkGray),
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.Center
) {
Text(
text = text,
style = MaterialTheme.typography.h6
)
Text(
text = text,
style = MaterialTheme.typography.subtitle2
)
}
}
}
}
I put some color because i wanted to know the space provided by the card to his childrens, and it's seems ok. Event if i'm making fillMaxHeight for the column, it s warping content and not filling height space. Suprisly, if i change fillMaxHeight by fillMaxWidth, it will fill the width. I'm asking why it doesn't do the same for the height with fillMaxHeight
Thanks