Android ViewPager – setOffscreenPageLimit or how the keep the fragments state

Using ViewPager is an easy task. THe hard thing is to keep the state of the fragments inside when you swipe.
The ViewPager has a method:
setOffscreenPageLimit(int pages). which keeps the fragments alive inside.



You may also like...