如何为查看寻呼机选择适配器?
How to choose adapter for view pager?
我需要在 ViewPager 中显示图像。
但我不知道该选择哪个适配器:
1) PagerAdapter
2) 片段适配器。
我的任务显示图片用什么比较好?
Google 的示例使用了 PagerAdapter,所以我会使用它
ViewPagers use PagerAdapters as a supply for new pages to display, so
the PagerAdapter will use the fragment class that you created earlier.
http://developer.android.com/training/animation/screen-slide.html#viewpager
如果它只是图像,那么我建议只使用寻呼机适配器,因为不需要片段。
我需要在 ViewPager 中显示图像。
但我不知道该选择哪个适配器:
1) PagerAdapter
2) 片段适配器。
我的任务显示图片用什么比较好?
Google 的示例使用了 PagerAdapter,所以我会使用它
ViewPagers use PagerAdapters as a supply for new pages to display, so the PagerAdapter will use the fragment class that you created earlier.
http://developer.android.com/training/animation/screen-slide.html#viewpager
如果它只是图像,那么我建议只使用寻呼机适配器,因为不需要片段。