I have a SherlockFragment that inflates a layout containing a viewpager that allows me to scroll through several fragments of the tabs that I created.
The first time this fragment is tied to my activity, everything works fine and as expected, but if I go back and go into the fragment again, the viewpager or its adapter (it looks like this: "TabAdapter extends FragmentPagerAdapter implements ActionBar. TabListener, ViewPager. OnPageChangeListener ") cause problems:
- View of fragment stored in viewpager is not displayed
- Actually, I have 4 tabs, if I set "setOffscreenPageLimit", nothing becomes visible in the viewpager on vacation, no matter what I do;
if the "setOffscreenPageLimit" parameter is not , the views displayed inside the viewpager are displayed only if I scroll at least two tabs left or right. - It also seems that the pager now skips some tabs during scrolling if "setOffscreenPageLimit" is not used .
Thanks for any ideas that could solve this problem.
source share