I am using the last navigation library (version 2.4.0) which include multiple backstacks with a bottom navigation view.
The default behavior is that each backstack is saved when user go back to a tab. I want to clear a backstack when the user leave a tab.
Based on this bottom nav with 3 tabs :
Tab1 | Tab2 | Tab3 |
---|---|---|
ScreenA1 | ScreenB1 | ScreenC1 |
ScreenA2 | ScreenB2 | ScreenC2 |
From Tab1, if user:
- go to ScreenA2
- clic on Tab2 (ScreenB1 displayed)
- go back to Tab1
- here I want ScreenA1 and not ScreenA2 (default behavior of navigation library)
Thanks