I am using this example to use a ViewPager
and a PagerAdapter
.
But how could I feed the PagerAdapter
with data from a adapter like CursorAdapter
where I load the data using a CursorLoader
?
The .setAdapter()
on the ViewPager
only takes a PagerAdapter
. Then I would guess I need to bind the CursorAdapter
within开发者_JS百科 the PagerAdapter
, but I could not find a way doing this.
Here's a blog post where I offer the source code for a CursorPagerAdapter
which does what you appear to want.
You don't need the CursorAdapter
, just use the Cursor
to populate the views in the PagerAdapter
.
精彩评论