Fragments In Viewpager - Wrong Index?
I'm using a ViewPager to display 3 ListFragments of the same class, but the ListView content of each Fragment should be different depending on Fragment's index. ListFragment:
Solution 1:
ViewPager creates nearest items for swipe animation purpose. So first time when activity attaches ViewPager user should see first fragment and can swipe to second one. When user swiped ViewPager creates third one and user can swipe again.
- attachment of
ViewPager ViewPagercreates first and second items - user see first fragment- swipe begin - user see transition between first and second
- swipe end - user see second fragment
ViewPagercreates third item- swipe begin - user see transition between second and third
- swipe end - user see third fragment
ViewPagerdestroys first fragment and create fourth- etc
Post a Comment for "Fragments In Viewpager - Wrong Index?"