,支持tab滑动切换,当切换到最左边或者最后边的时候停止滑动
本例子切换tab的效果根据AccelerateDecelerateInterpolator来实现,主要根据ViewPager来实现的,自定义PagerSlidingTabStrip,KenBurnsView来实现不错的效果。主要实现类 ScrollTabHolderFragment 继承一个抽象类实现的public abstract class ScrollTabHolderFragment extends Fragment implements ScrollTabHolder {protected ScrollTabHolder mScrollTabHolder;
public void setScrollTabHolder(ScrollTabHolder scrollTabHolder) {
mScrollTabHolder = scrollTabHolder; }@Override
public void onScroll(ScrollView view, int x, int y, int oldX, int oldY, int pagePosition) { // nothing }}
运行效果:
效果源码: