[Note]ViewPager & ViewPagerAdapter & ViewPageStateAdapter

-ViewPager

  • allows u to flip left & right to show data
  • often conjunction with fragment, which is convenience to manage lifecycle of page
  • there are two standard adapter  'ViewPageAdapter' & 'ViewPageStateAdapter' implemented using fragment, which cover the most common use cases

-ViewPageAdapter
  • this adapter is best for use when there are static fragments to be paged through, such as a set of tabs


-ViewPageStateAdapter

  • this adapter is best for use when there are a large number of pages, working like the listview

沒有留言: