I’m trying to build a layout in Jetpack Compose where I have a Column nested inside another Column, and I want the inner one to be scrollable.
The key requirement is that the scrollable container should be responsive — I don’t want to set a fixed height (e.g. height(250.dp)), because it should adapt to different screen sizes and layouts.
My current approach with verticalScroll() works, but only when I constrain the height, which I want to avoid.
Column( modifier = Modifier .height(250.dp) .verticalScroll(rememberScrollState())
weight(1f) expands the container fully, which you don’t want.
Use heightIn(max = ...) to cap the height while keeping it flexible.
This allows verticalScroll() to work without fixed or forced sizing.