I have an application that uses a sliding menu as the means of navigation. I have three main fragments that i want to switch between using the navigation menu. Currently i have one MainActivity which is supposed to cycle through these three fragments. The problem is that within each of the three main fragments, i have buttons that, when clicked, should launch another fragment and place the main fragment on the stack to go back to it.

How can i manage this navigation so i am able to use one main activity to swap 3 main fragments and also handle sub fragments on each main fragment?

Hopefully that was clear enough!