I have a simple navigation graph like this:
MainFragment -> ListFragment -> DetailFragment
How can I achieve a "shortcut" from MainFragment to DetailFragment, so that:
- UP navigation from DetailFragment will navigate to ListFragment within the graph and
- BACK navigation from DetailFragment will return to MainFragment (optionally, BACK could behave as UP)
Is this possible? Thanks for suggestions!
EDIT: My Solution
I can simply navigate to ListFragment first and then immediately to DetailFragment like this (I call both "navigate" calls from MainFragment):
According to documentation, which says, that "... Up button should function identically to the system Back button", I decided not to make differences between BACK and UP actions.