I have a fragment in which I want to display a number of similar pages
using ViewPager. For some reason I thought that it would be simpler to
extend the base PagerAdapter to feed views to the ViewPager. My custom
PageAdapter implements instantiateItem by inflating a layout, populating
its widgets, and then calling addView against the container view. The
containing ViewPager is the view that I return from the onCreateView
method of the fragment.
The problem is that this is working from a paging point of view, but the
screen remains blank. By setting breakpoints, I find that when I swipe
across the (blank) screen, my PagerAdapter is called as expected
(instantiateView, destroyView, etc.) to return the next/previous view,
but nothing is shown -- only the background of the ViewPager. Examining
the ViewPager at the breakpoint, the expected instantiated views are in
its array of child views.
Any clues on where to look? I've implemented a FragmentPagerAdapter
elsewhere with no issues, but this does seem like it would be easier,
especially since these views have no controls on them (just data).
Doug Gordon
GHCS Software
--
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
---
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.