I have two fragments in my activity. In the first fragment, I display the titles, when I click the titles subtitles appear. In the second fragment, I display the content of the related topic, user can navigate a different page in this fragment. When I put the fragments to backstack, and retrieve the previous backstack record, I retrieve the wrong fragment's backstack record.
I want to navigate forward and backward in both fragments and manage the backstack properly. I use a single backstack for both fragments. How to manage backstack of two fragments properly?