Hello, I'm trying to create a application that uses the multiple fragments controlled by a ViewPager, each of which might need system wide resources. For example, two fragments both use the rear-facing camera, and show a camera preview.
My issue comes up when the two fragments are positioned beside each other in the ViewPager, the FragmentPagerAdapter (or in my case FragmentStatePagerAdapter) attempts to pre-load the fragments on either side of the shown view, causing two fragments to both request the camera resources at the same time. Does anyone know of a way to prevent the PagerAdapter from pre-loading fragments? Or is there a best practice for using a resource like the camera which must have only one user at a time? Thanks, -Matt -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en