Hi, what back button behavior would you guys expect with bottom navigation. Would you retain the history or always pop to the root tab? If we have for instance 3 tabs, would you expect A -> B -> C -> A -> B ; pressing back button: A -> C -> B -> A or would you expect A. Material Design doesn't cover this clearly and I read that google apps arent consistent here
03/05/2021, 1:22 PM
From a user point of view, I would expect the whole history.
03/05/2021, 1:24 PM
The Material Design site used to recommend the "always pop to root" approach but they removed that suggestion. The Compose Navigation page does pop to root but I think it's mostly to keep things simple. Some apps like YouTube keep history (without duplicates) while others like TikTok pop to root. I don't mind either.
03/05/2021, 1:33 PM
multiple backstack isn't supported yet in both navigation lib and compose navigation. though there's a workaround im the navigation lib. and I think the support is coming soon.
single backstack cannot retain backstack for each tab
03/05/2021, 2:04 PM
If there's some state on the screens I would like to retain then the whole history otherwise A
03/05/2021, 3:53 PM
Pop to root is consistently what the UX research we've done shows is the least confusing to users. That's entirely separate from the conversation on whether each tab should save its own state when you reselect it (which is what the multiple back stack work will enable)
03/05/2021, 5:05 PM
Ah, right, I got confused. We also pop to root in our application
03/09/2021, 8:52 PM
Thanks a lot for your time guys. I will go with pop to route, which is also the simpler solution 🙂