I'm using https://gist.github.com/8cbe094bb7a783e37ad1 in order to display multiple page of a ViewPager at once. It works great with a simple PageAdapter, but I need to display a large amount of Bitmaps. So I read http://developer.android.com/training/displaying-bitmaps/index.html and it says :
You can implement this pattern using a ViewPager component backed by a PagerAdapter. However, a more suitable backing adapter is the subclass FragmentStatePagerAdapter which automatically destroys and saves state of the Fragments in the ViewPager as they disappear off-screen, keeping memory usage down.
I tried to create a new FragmentStatePagerAdapter but it doesn't work :
E/AndroidRuntime(25400): android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff
I really don't understand what's the error, because I'm not using any particular resources except layouts.
Does anyone have an idea how to resolve this ?