I'm trying to structure my composables this way:
Column ->
Tab(Child)
HorizontalPager (Child)->
LazyColumn (Child of Horizontal Pager)
I want to have a toolbar with (scroll | enterAlways) attribute, then a tablayout under, then a list below the tablayout.
I tried this structure but I'm getting this error
java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope.
This is the structure of what I currently have:
Box(
Modifier
.fillMaxSize()
.nestedScroll(nestedScrollConnection)
) {
Column(){
TabRow(
) {
}
HorizontalPager(
) {
LazyColumn {
}
}
}
TopAppBar()
}
Is there any alternative way to achieve a nested Lazycolumn inside a HorizontalPager and the HorizontalPager will have Column as it's parent?