Is possible to have a navigation between <Standard...
# compose
l
Is possible to have a navigation between Standard sheets? ModalBottomSheetLayout from Accompanist only works for Modal sheets. And even by setting the
scrimColor
parameter to
Color.Unspecified
, to make sheets looks like standard sheets, we don't have control over the peekHeight.
i
What does 'navigating between standard sheets' actually mean in your case? Swapping out the contents of the sheet? You can certainly put a NavHost within the sheet content if you want to do that
☝🏽 1
l
Just like the Accompanist library, being able to navigate between two standard sheets for instance (instead of updating the content of the sheet with a NavHost)
i
I don't think that makes sense for a standard sheet, which is a persistent fixture on your screen and not something you temporarily show/hide or navigate to. Can you explain what design pattern you are trying to accomplish?
1
l
I'm trying to achieve what the iOS team have done. They have two standard sheets in one screen, and they are able to switch between the two. (the first sheet is just a button for now, but it will be filled with more components)
c
I wonder if this can be simulated using a single sheet with a NavHost in it and using animations. There's AnimatedNavHost Composable in Accompanist library.
1
l
Yeah with a NavHost it does the job, that's my current implementation. And even without AnimatedNavHost, but just with
Modifier.onGloballyPositioned
the sheet resize properly. I just wanted to know if it was possible to have it as separated sheets