Nicolai
01/17/2023, 1:18 PMDefaultCard(
Modifier
.padding(horizontal = 16.dp)
.wrapContentHeight()
.fillMaxWidth()
) {
Text(text = "looooooooooong text........")
Image(needs to fill all available space in the height as of wrapping the Text element)
}
Nicolai
01/17/2023, 2:01 PMJonas
01/17/2023, 2:45 PMBox(Modifier.size(500.dp, 1000.dp)) {
Row(Modifier.height(IntrinsicSize.Min)) {
//Image
Box(Modifier.aspectRatio(1f).background(Color.Blue))
Text("Foo\nBar\nFoo")
}
}
My first idea was something like this.
But according to your description you need a Card (Box) as wrapper instead of the row I used here.Jonas
01/17/2023, 2:54 PMBox(Modifier.size(500.dp, 1000.dp)) {
Box(Modifier.height(IntrinsicSize.Min)) {
//Image
Box(Modifier.fillMaxHeight().width(10.dp).background(Color.Blue))
Text("Foo\nBar\nFoo")
}
}
Jonas
01/19/2023, 8:56 AMNicolai
01/19/2023, 11:40 AM