agrosner
10/18/2024, 5:12 PMNavHost
using restore state, singletop when navigating to tab: but cant restrict routes to a specific tab, but simpler to implement
(2) somewhere read using multiple navigation<>(..)
wrappers: downside is entering each navigation<> means have to hoop through the start destination (not a huge deal), but can put only certain routes in that navigation stack. Also seems that when i jump between the navigation graphs I cant preserve the backstack state and hit the tab starting route again (might be by design?)
(3) chatgpt suggested multiple NavHosts for each tab with their own navigation controllers 😅 .Stylianos Gakis
10/18/2024, 5:36 PMagrosner
10/18/2024, 5:38 PMnavigation<> { }
graphStylianos Gakis
10/18/2024, 5:39 PMagrosner
10/18/2024, 5:39 PMrestoreState
and singleTop
agrosner
10/18/2024, 5:40 PMStylianos Gakis
10/18/2024, 5:40 PMagrosner
10/18/2024, 5:41 PMStylianos Gakis
10/18/2024, 5:42 PMagrosner
10/18/2024, 5:44 PMStylianos Gakis
10/18/2024, 5:50 PMagrosner
10/18/2024, 6:01 PMagrosner
10/18/2024, 6:02 PMStylianos Gakis
10/18/2024, 6:05 PMColton Idle
10/19/2024, 10:04 PMagrosner
10/20/2024, 3:12 AMagrosner
10/20/2024, 3:13 AMagrosner
10/20/2024, 3:14 AMStylianos Gakis
10/20/2024, 9:09 AMnavigateUp
does for you with recreating the right backstacks in the scenarios when that's needed.
You also lose the ability to look up the hierarchy to find some destination you might be interested in if it happens to be on some other NavHost instead. Same with potentially grabbing the parameters from another destination in the backstack, which you can normally do on a NavHost.
Still not a good idea, even if you "get it right" with a lot of effort. Especially when the alternative of just using one NavHost is so much simpler and already works 😅agrosner
10/20/2024, 1:55 PMagrosner
10/20/2024, 1:55 PMStylianos Gakis
10/20/2024, 2:36 PMColton Idle
10/20/2024, 4:15 PMStylianos Gakis
10/20/2024, 4:28 PMagrosner
10/20/2024, 8:25 PMagrosner
10/24/2024, 5:53 PM