hi there, Im using navigation compose, I have a ma...
# compose
n
hi there, Im using navigation compose, I have a main screen which is composed by
Scaffold
(bottom navigation bar), there are three Screens inside, but I have another Screen which is not composed inside
Scaffold
, how should I use
NavHost
to do it? I tried to use
Nested Navigation
in
NavHost
, but it doesn't display the Screen inside
Scaffold
properly.
i
If you're just trying to only show the bottom nav on certain destinations, that's a topic that has come up a number of times in the past such as here: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1627490432392100?thread_ts=1627477759.324500&cid=CJLTWPH7S
n
hi ! @Ian Lake thank you for your answer! Im sorry i didn't search for this similar answer before, but I think my question would be the same as the one you just answered https://stackoverflow.com/questions/68895484/how-to-hide-bottom-bar-in-jetpack-compose-when-using-accompanists-navigation-an
but if i use if to detect this, you can see the condition of the bottom navigation bar disappearing
because I also wrote the
NavHost
inside the Scaffold, like the stackOverFlow link sent above, if other pages want to display it full screen, they will have to control the hiding of the BottomBar based on some conditions
or create two
NavHosts
one to control the interface with Scaffold (which contains
BottomBar
) and the other to control the interface without
BottomBar
, but I think this may not be a good approach, so I would like to ask if there is any other good way to do it.
n
@Nthily did you end up finding a solution to this? Having the same issue where some screens come across as jumpy as we see the bottom bar dissapear / appear and it forces the content to resize.
n
@Nathan Castlehow no, I just try to cover it with other animations as much as possible, and try to make it difficult for users to feel
👍 1