boolean isScrolled ;
@Override
public void onPageScrollStateChanged(int i) {
switch (i) {
case ViewPager.SCROLL_STATE_DRAGGING:
isScrolled =false;
break;
case ViewPager.SCROLL_STATE_SETTLING:
isScrolled =true;
break;
case ViewPager.SCROLL_STATE_IDLE:
if (vp_home_list.getCurrentItem() ==vp_home_list.getAdapter().getCount() -1 && !isScrolled) {
//滑到最后一个页面之后的继续操作
}
if (vp_home_list.getCurrentItem() ==0 && !isScrolled) {
//滑到第一个页面之后的继续操作
}
isScrolled =true;
break;
}
}