Replace Fragment inside a ViewPager

I’m trying to use Fragment with a ViewPager using the FragmentPagerAdapter. What I’m looking for to achieve is to replace a fragment, positioned on the first page of the ViewPager, with another one. The pager is composed of two pages. The first one is the FirstPagerFragment, the second one is the SecondPagerFragment. Clicking on a … Read more