Pablo
02/11/2025, 5:20 PMColumn
that has various Composables, one of them being another Column
? I have a Card
with a Column
with 3 items, a title, a body (Column
with n texts and scroll) and a bottom text. The idea is if the card
has more height than the screen, then, the user will have the possibility to scroll the body (body has a scroll). The problem is that if the body has a lot of content (filling the entire screen height), the bottom text of the card is not displayed. Sample in the thread:Pablo
02/11/2025, 5:20 PMCard(modifier = modifier.widthIn(max = 400.dp).fillMaxWidth().padding(16.dp)) {
Box(modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.Center
) {
Column(modifier = Modifier.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(text = "1")
Text(text = "2")
val scrollState = rememberScrollState()
Column(modifier = Modifier.verticalScroll(scrollState)) {
repeat(30){ Text(text = "1234567890") } // long body
//repeat(3){ Text(text = "1234567890") } // short body
}
Text(text = "3")
}
}
}
Pablo
02/11/2025, 5:22 PMZach Klippenstein (he/him) [MOD]
02/11/2025, 8:05 PMweight(1f, fill = false)
Pablo
02/11/2025, 8:16 PMZach Klippenstein (he/him) [MOD]
02/11/2025, 8:17 PMBox
in your layout anyway since it only has one child (the Column
), and any modifier you're applying to the box you could just put on the columnPablo
02/11/2025, 8:21 PM