ViewPager loads side fragments, I need it to load all the fragments that are, how to implement this? (needed to implement ImageSlider)
By default, the
ViewPagerloads the on-screen item, as well as one sibling in each direction, so that the scroll gesture responds immediately. The number of adjacent pages to load can be adjusted by calling setOffscreenPageLimit (int) .
p. 238 – Phillips B., Stuart K., Marsicano K. Android. Programming for professionals. 3rd ed.
mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setOffscreenPageLimit(4);