I have a ViewPager
controlling five Fragments
. When I swipe from Fragment
at index 1 to Fragment
at index 0, there\'
When you use the default implementation of setOffscreenPageLimit()
it is only loading the one fragment which is to the right of it. For eg. when you are on index 1, it has index 2 loaded in memory but not index 0, so swiping left will have to generate a new fragment from scratch. To test this theory you might want to use setOffscreenPageLimit(2)
and then try swiping index 1->0. This in no way is the optimal solution but will help clear out your doubts about the concept.