You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When nesting a NavHost inside a ModalBottomSheet content, it shows visual glitches instead of a correct Composables. By glitches I mean nested NavHost (bottom sheet content) is being displayed on the sheet and underneath the sheet, Compose is copying the content to two places and not displaying the original NavHost at all.
What it should show, blue is a main view (whole screen home NavHost), red is bottom sheet content (150.dp height).
What is shown, bottom sheet content displayed on the sheet and underneath it.
It appears that wrapping the NavHost in StateHolder solves the problem with displaying the content, but the behavior of the bottom sheet is still a little bit bugged with this workaround. Instead, it sometimes doesn't show the showing/hidding animation of the bottom sheet correctly.
It appears that rememberNavigator consistently returns the same Navigator. One possible workaround is to assign a unique name each time rememberNavigator is used.
Perhaps we should consider automatically assigning different names when using rememberNavigator
Describe the bug
When nesting a
NavHost
inside aModalBottomSheet
content, it shows visual glitches instead of a correctComposables
. By glitches I mean nestedNavHost
(bottom sheet content) is being displayed on the sheet and underneath the sheet,Compose
is copying the content to two places and not displaying the originalNavHost
at all.What it should show, blue is a main view (whole screen home
NavHost
), red is bottom sheet content (150.dp
height).What is shown, bottom sheet content displayed on the sheet and underneath it.
Minimal reproducible example
Repo: https://github.com/tomczyn/PreCompose-Sample
Branch with
StateHolder
fix: https://github.com/tomczyn/PreCompose-Sample/tree/fixWorkaround
It appears that wrapping the
NavHost
inStateHolder
solves the problem with displaying the content, but the behavior of the bottom sheet is still a little bit bugged with this workaround. Instead, it sometimes doesn't show the showing/hidding animation of the bottom sheet correctly.The text was updated successfully, but these errors were encountered: