0

FragmentStatePagerAdapter creates about 3 fragments each time. I'd like it to create say 10 fragments to populate the viewpager at once. I dont see any methods to change the default. Im dealing with a large number of items and each fragment in the adapter makes a network call thus some overhead on each new page traversal. I'd like to cut it down by keeping more items in the adapter at once.

j2emanue
  • 60,549
  • 65
  • 286
  • 456

1 Answers1

0

Get a hold of your ViewPager and use setOffscreenPageLimit(10);

Emmanuel
  • 13,083
  • 4
  • 39
  • 53