Android:Fragment+ViewPager+FragmentPagerAdapter

1)ViewPager 官方的建议:建议ViewPager和Fragment一起使用,便于管理每一页的生命周期
ViewPager is most often used in conjunction with {@link android.app.Fragment},which is a convenient way to supply and manage the lifecycle of each page.
There are standard adapters implemented for using fragments with the ViewPager,which cover the most common use cases.
 
  
2)FragmentPagerAdapter
 
  
   FragmentPagerAdapter:
   getCount()
   Fragment getItem(position)

你可能感兴趣的:(Android)