0

I have two destinations A (Master) and B (Detail). I have the following actions:

  • A to B
  • B to B (next item)

This works fine, but it's the up and back behaviour I'm just not getting right.

When I get from A to B and I press either back or up I go back to A. This is working as expected. But when I have done the following navigation: A -> B -> B I need back to go to the previous B and up to go to A.

How do I configure my NavGraph in such a way that this happens?

To be clear, with back I mean the 'device' back button, and with up i mean the button in the ActionBar

SEG.Veenstra
  • 718
  • 1
  • 7
  • 18
  • Can you explain what is B->B they are separate screen's(Fragment??) how can you navigate from B to B? share the code of your nav_graph and SS(if possible!!). And Action onBackPressed and NavigateUp both work similarly – Anmol May 10 '19 at 12:44
  • B -> B means it should create a new instance of the same type of page. You navigate to it by going to the 'next' item. – SEG.Veenstra May 13 '19 at 10:55
  • can you share code of nav_graph? – Anmol May 13 '19 at 12:39

0 Answers0