我正在使用此示例来使用 aViewPager和 a PagerAdapter。但是我怎么能从PagerAdapter适配器中提供数据,比如CursorAdapter我使用 加载数据的地方CursorLoader?
上.setAdapter()唯一ViewPager需要一个PagerAdapter. 然后我想我需要在CursorAdapter内绑定PagerAdapter,但我找不到这样做的方法。
我正在使用此示例来使用 aViewPager和 a PagerAdapter。但是我怎么能从PagerAdapter适配器中提供数据,比如CursorAdapter我使用 加载数据的地方CursorLoader?
上.setAdapter()唯一ViewPager需要一个PagerAdapter. 然后我想我需要在CursorAdapter内绑定PagerAdapter,但我找不到这样做的方法。
这是一篇博客文章CursorPagerAdapter,我在其中提供了您想要的源代码。
您不需要CursorAdapter,只需使用Cursor来填充PagerAdapter.