0

I have fragments A,B,C,S and DF where S are settings and DF dialog-fragment. Im using navigation graph, navigating between fragments from a drawer, no actions defined. There is one activity. A is a home fragment and I have also added B and C to appBarConfig so I have "burger" icon on them instead of arrows. Moving between fragments works fine, but I have below issues:

  1. Lets say i navigate A-> B -> C -> B, pressing back always goes back to home fragment A, pressing again exits. I would like it to be that when i press back: it goes to previous fragment, press back again: and then its home fragment (or of course home fragments firs time if it was visible before)
  2. Next issue is with DF: it opens, but on the top of a home fragment A, even though, it was opened from B or C.
  3. Same with back arrow within S, no matter if I'm navigating to it from B or C, pressing back arrow on status bar always leads me to home fragment A.

I presume all above can be solved with one solution as its related to fragment A being always on the top of the back stack. I see some apps on my phone, that case 1 is common so i could live with it, but how to fix 2 and 3?

0 Answers0