I’ve ran into a odd interaction with my `NavHost` ...
# compose
c
I’ve ran into a odd interaction with my
NavHost
when I add a
.verticalScroll()
modifier to it It seems that the composables in my NavHost can’t
fillMaxHeight()
anymore and fallback to wrapping the content size Has anyone else managed to have “scrollable” NavHost? (reasoning behind this is to have a scrollState in which a collapsing toolbar can react to)
i
Adding vertical scrolling means there's an ~infinite max height (as the whole point of scrolling vertically is to have more content than what fits on the screen), so
fillMaxHeight()
inside a scrolling container doesn't make much sense?
c
Ah that makes a lot of sense!
Ideally I want to force the child to be at least full screen size, but guessing that’s not really possible without some manual calculation and setting minHeight
d
Just today I saw this. Looks like it can be done, though I'm not sure if this is something good to rely on: https://stackoverflow.com/questions/67929861/fillviewport-behavior-in-jetpack-compose-column
a
collapsing toolbars should be implemented via a nestedScroll mechanism. I think this repo is using it https://github.com/onebone/compose-collapsing-toolbar so you can try this solution
🙏 1