Jetpack Navigation with Multiple Nested NavHost - Tutorial

preview_player
Показать описание
How to use Jetpack Navigation with nested navigation hosts. Creating a bottom navigation and switching between different tabs and screens which are in separate navigation hosts.

Рекомендации по теме
Комментарии
Автор

seeing your video was the key for a probleming that I was having. I've instantiated all my controllers in the main Composable instead of inside the same as the NavHost and it was trowing error : "ViewModelStore should be set before setGraph call" and I was very lost until I found your video. Thanks!

wagnerarcieri
Автор

this was exactly what I was trying to understand. It made sense to be able to just have nested navhosts based on specific routes but couldn't find clear documentation on this! I'm curious if you ever found other ways that you might've found a better better than what you discussed in the video. Maybe as time passed the android team developed a straightforward method?

malva
Автор

Main issue I could foresee of using nested NavHosts is the deeplinking management. Is this something you dealt with?

cpepos
Автор

I want to click on the product list, it will navigate to the list screen but still keep the tab structure how

thangtx
Автор

How can we achieve same behaviours by using xml? There is no any example about it. I want to implement it without creating a new activity because of single-activity pattern. What should I do?

tunahanbozkurt
visit shbcf.ru