How to implement proper ancestral navigation for application with several activities one of which can swap content fragments?
I have one main activity with drawer layout and with content represented by fragments. I have kind of main fragment, which is initialized in onCreate() method and added to content holder. In this part navigation is pretty clear - I just swap out fragments when I click nav items.
From one of the fragments, in which I have a list of items, I can go to child activity which represents the item details. I decided to implement it as child activity, because navigation in this part isn't represented by NavDrawer, but just by Up button.
The question is - how can I properly navigate from this child activity back to main activity with proper fragment in place? The problem is that when I go back the main activity is created from scratch, so I get wrong fragment in place (the main one).
If it still isn't really clear, it looks smth like this.