Ok, so the items are there and the views are there. What I would do at this point is check the attributes (data) of those views:
- Their positions and sizes - Visibility - Animation state - Translation / scaling - Scroll positions Or I would try to debug into the view pager's onMeasure / onLayout / populate + scrollToItem For this second part, I would perhaps add a button in the layout that calls requestLayout or setCurrentItem on the pager, to trigger as needed. -- K 2014-12-20 17:17 GMT+03:00 Doug Gordon <[email protected]>: > Kostya, I have done that and what I am seeing is the background of the > ViewPager, but not my fragments' views. I set a breakpoint so I could go > back into the ViewPager, and examining its data structure I find that not > only does its mItems array contain my instantiated fragments, but also the > mChildren array in the base View contains my fragments' expanded view > hierarchies! > > There is just something that is preventing the views from being drawn, > even if I explicitly call invalidate() on the ViewPager. And it still seems > that it must have something to do with using the support.v4 fragment > support since it all works fine using native fragments. > > On Friday, December 19, 2014 4:57:43 PM UTC-5, Kostya Vasilyev wrote: >> >> Have you tried debugging into ViewPager code? >> >> To see if your fragments' views are actually there and how they're laid >> out? >> >> Another thing I often use in cases like this -- is to set the background >> color of various views to distinct noticeable colors, like pink, cyan, etc. >> In this case, I'd try the view pager itself, its parent view, and your >> fragments' views. >> >> -- K >> >> 2014-12-20 0:30 GMT+03:00 Doug Gordon <[email protected]>: >> >>> I haven't received any responses on stackoverflow about this, so am >>> giving it a shot here. >>> >>> My app, which is fairly large and complex (hard to post meaningful code) >>> uses as its main view a ViewPager with a FragmentPagerAdapter. Since the >>> minSDK is 14, I originally wrote it to use the native Fragment and related >>> classes (ViewPager from support.v4 and FragmentPagerAdapter from >>> support.v13). This has all been working perfectly for a long time. >>> >>> Recently I decided to build in more compatibility, mainly for themes, by >>> using the appcompat.v7 library. However, using this library required that I >>> use the Fragment and FragmentPagerAdapter, etc. classes from the support.v4 >>> library (meaning that I also had to change my Activity to a >>> FragmentActivity, call getSupportFragmentManager, etc.). >>> >> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

