ViewPager.setCurrentItem(int) not working


I followed the instructions as mentioned in the book but for some reason the method setCurrentItem(int) does not seem to work, may you please tell me about the same as to why is it not working.

I also tried putting integer values directly still, the first item is shown in ViewPager Activity.


Can you post the relevant parts of your code here? I suspect that there is a bug somewhere that’s preventing this from working correctly.


Thanx and yes sir you were right there was one and i was able to find it and fix it as well,Thanx…


Show me how ,kindly i have the same problem