ViewPager replace fragments example

This is an example of how to replace fragments in ViewPager based on the
solution provided by mdelolmo from
http://stackoverflow.com/questions/7723964/replace-fragment-inside-a-viewpager
The solution is modified slightly to provide back button functionality