Load only one Fragment in ViewPager

android, android-fragments, android-viewpager, fragmentstatepageradapter

Solution

This might be the thing you are looking for:

  mPager.setOffscreenPageLimit(n); // where n is the number of offscreen pages you want to load.

**The minimum value of it can be "1" as you said. ** check this link and also read the comments.

Problem

I have used `ViewPager` with `Fragment`. But it loads two pages at time. Is there any way to load only one page in viewpager ?

Original source

Related problems