ViewPager和FragmentStatePagerAdap
2016-10-10 本文已影响28人
suxiliu
1.xml资源文件创建ViewPager和PagerTabStrip

2.新建MyFragmentStatePagerAdapter继承FragmentStatePagerAdapter

3.Activity中实现OnPageChangeListener接口,ViewPager加载事件监听器


运行代码:

1.xml资源文件创建ViewPager和PagerTabStrip
2.新建MyFragmentStatePagerAdapter继承FragmentStatePagerAdapter
3.Activity中实现OnPageChangeListener接口,ViewPager加载事件监听器
运行代码: