onCreateView of second fragment (tab) is called while on the first
I have 10 tabs in my activity . As soon as I open the activity the first fragment gets displayed but the method (AsyncTask) present in the next fragment gets called. And if I go to the next tab say 3rd tab then the method present in the 4th fragment gets called and so on. I don't understand this behavior. Please help! You must know how the viewPager works populating the fragment in the different positions When you start on the position 0, then the fragment on the position 0 and the one of the position 1 are created. Then when you swipe to the position 1 the fragment on the 2 position is