Reputation: 852
I have got a weird issue with the 3 tabs of my ActionBar :
When i go from my second tab to the third, onCreateView() is not called, i like it because values in my third tab are in the same state.
Now, i will switch to the first tab and go back to the third, and now onCreateView() is called, and i don't want that...
Someone knows how to avoid this ? I don't understand why there is a difference between my second and my first tab !
Thank you for reading
Upvotes: 0
Views: 46
Reputation: 7384
It's probably because of the offscreenlimit in viewpager (I suppose it's your case).
It's set by default to one which means that view pager holds one fragment at each side of your currently visible tab in memory. (And when it's in memory it means that onCreateView() gets not called)
Upvotes: 1