In all the example of the use of fragments seen I see a problem.
The my idea is that the onCreate function of each fragment should be called after swipe so before the creation of the next page.
In all the case the onCreate of fragment 1 and 2 is called when you must display page 1 and after the onCreate of fragment 3 is called when you must display page 2.
Why this problem ?