I have 4 fragments: A, B, C and X.
A, B and C are found on the bottom navigation bar, so every time I click on item A, I get the A fragment on the screen, click on B, I get B.
When I click on C, I get the C fragment, which has a button, that takes me to X fragment. Now my problem is, that if I click on the Navigate to X button, after that when I navigate to anywhere from there and then back again on C, I get X.
But everytime I click on the item C, I want to get back to fragment C, no matter if I got to the X fragment before that. How can I implement this?