LazyColumn {
item {
// Header content here
}
items(section1Items) { item ->
// Items for section 1
}
item {
// Section 2 header (if applicable)
}
items(section2Items) { item ->
// Items for section 2
Box(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp)
.background(
color = Color.White,
shape = RoundedCornerShape(8.dp)
)
.border(
width = 1.dp,
color = Color.Gray,
shape = RoundedCornerShape(8.dp)
)
) {
LazyColumn {} Is this possible?
}
}
}
Is this possible?
a
Abhishek
01/10/2025, 11:27 AM
@Nurlibay
I am new to compose and learning how things work in compose. However I encountered the similar situation like this.
Answer: This will result in infinite height constraints exception.
Nesting lazycolumn inside another without providing height to one of them will result in infinite height constraints exception.
Possible solution: Specify height of outer lazyColumn or the Box component that holds nested lazyColumn.