Fragments in a ViewPager example
Imagine the following structure:
[ Root fragment | Side fragment ]
You can replace Root fragment for another one and, at any moment, you could swipe to Side fragment. Also, it's possible to return to previous fragments by pressing back button.
In the code, I'm using support library v7 but it is not mandatory.