Chris Fillmore
08/06/2021, 9:19 PMIan Lake
08/06/2021, 10:17 PMjossiwolf
08/07/2021, 8:15 AMChris Fillmore
08/09/2021, 10:39 AMsetContent {
CameraPreview()
NavHost(...) {
...
}
}
bottomSheet(...) {
for (item in <empty list>) {
...
}
}
My bad.BottomSheetNavigator.Destination
could accept a fallback route to navigate to, in cases where the bottom sheet is itself at the bottom of the stack?
Or, instead, add some behaviour where the bottom sheet can be set as startDestination, with another destination underneath?
Reason I ask is, on iOS we have roughly this capability, by opening a bottom-sheet-style modal in a viewDidLoad
callback. I’d like to have some similar capability on Android, so that I can open a bottom sheet when an Activity initially starts.jossiwolf
08/09/2021, 4:21 PMBottomSheetNavigator
is only aware of entries on its state's back stack, which means there are only entries with `BottomSheetNavigator.Destination`s on there.
The NavController
keeps track of the global back stack but the navigator isn't aware of the NavController
. I think it would make more sense to have your Activity (or whatever is under the sheet) as startDestination and then navigate when the Activity starts.
But cc @Ian Lake cause I'd love to hear his thoughts about FloatingWindow
destinations as start destinationsChris Fillmore
08/09/2021, 4:22 PMIan Lake
08/09/2021, 4:26 PMCameraPreview
should be the start destination of your graph