antonyt / InfiniteViewPager

Augment Android's ViewPager with wrap-around functionality.
MIT License
694 stars 193 forks source link

This solution wo'nt work in some cases #11

Open htqbuu opened 10 years ago

htqbuu commented 10 years ago

The case is I need to show 3 view at the same time. So I set: setOffscreenPageLimit(2) That means, there are 5 views to be cached. And currently, I only have 4 fragments to make view. So, fragment manager will have a chance to attach duplicate fragment which cause fragment to be blank !.

DigitalDavo commented 10 years ago

I don't think you can use setOffscreenPageLimit() with this solution - this is a replacement for that sort of functionality. You just define all of your fragments to be in the infiniteview list and it loops through them backwards and forwards for you.