1

before, thanks lot for take time for my questions !

I have a BIG problem in my project, I used viewPager within dynamic Fragment

6 fragments used

so i extend FragmentStatePagerAdapter() for in my Activity. i want to swipe automatically from state 0 to 1 and to 5 in getItem() i create my tabs (i loaded 4 or 5 tab from 6) log in my onCreateView()

tab 0, tab 1, tab 2, tab 3, tab 4, tab 5

log in autoplay preference context

tab 0 auto, tab 1 auto, tab 2 auto, tab 3 auto, tab 4 auto, tab 5 auto,

in log below, i have wrong with my code viewPager at the first time 2 page loaded and i want to load just 1 fragment

see my Log screen capture

the true log (for 5 dynamic tabs) must be :

tab 0 (first load and then) tab 0 auto , tab 1 (second load and then) tab 1 auto , tab 3 (third load and then) tab 3 auto , tab 4 (fourth load and then) tab 4 auto , tab 5 (fifth load and then) tab 5 auto

I know that who ViewPager by default will load 3 fragments into memory,

I have try some sol like this but I don`t got any sol for me.

how to fix my viewpager and fragment position id to get just current status ?

please help me! tnx again dude.

MRK
  • 21
  • 3
  • I used this method `mViewPager.setOffscreenPageLimit(3);` and 98% fixed it, but i stay in 1 problem ! [see new Log](http://s5.picofile.com/file/8172930034/log2.png) : **tab 4** is loded at the first time in stack, but **tab 2 auto** and **tab 3 auto**, not going to **tab 4** and SKIPPED ! what wrong ? – MRK Feb 23 '15 at 15:27
  • Please add your code into your question. – Sadegh Feb 24 '15 at 10:46

0 Answers0