java - How to implement proper ancestral navigation for application with several activities one of which can swap content fragments? -
i have 1 main activity drawer layout , content represented fragments. have kind of main fragment, initialized in oncreate() method , added content holder. in part navigation pretty clear - swap out fragments when click nav items.
from 1 of fragments, in have list of items, can go child activity represents item details. decided implement child activity, because navigation in part isn't represented navdrawer, button.
the question - how can navigate child activity main activity proper fragment in place? problem when go main activity created scratch, wrong fragment in place (the main one). , want 1 went details activity.
if still isn't clear, looks this.
mainactivity(mainfragment) -> mainactivity(secondfragment) -> detailsactivity -> mainactivity(mainfragment)
and want this.
mainactivity(mainfragment) -> mainactivity(secondfragment) -> detailsactivity -> mainactivity(secondfragment)
looks should done automatically, due bug doesn't work stated in answer.
wiki
Comments
Post a Comment