I am currently building an app which has 3 different tabs. Let’s say ‘Home’, ‘Statistics’ and ‘Settings’.
I would like to change the “default navigation” system of the tabs a little.
Indeed, when clicking the back button in the tabs I would like to obtain the following behavior :
- Clicking on the back button in the ‘Home’ page will simply leave (exit) the app.
- Clicking on the back button in either the ‘Statistics’ page, or the ‘Settings’ page will always navigate directly back to the ‘Home’ page. For better understanding, please look into the Android
Now for the first point listed above I have already managed to achieve it.
I have, however, not found a solution to the second point. I have read in the doc that, considering the underlying navigation stack behind each tab, it is bad practice to route from a tab to another tab manually. But does it mean the navigation behavior cannot be customed at all ?
I am willing to be told this is not a good navigation practice and to it differently. But having spent so much time trying to find a way, I am now genuinely interested to know if it is even possible.
Thanks in advance for any help !
EDIT: missing word, clarity