private boolean pageScrolled(int xPos){
  if (items.size() == 0) {
    return false;
  }
  final int deltaScroll=xPos - lastScroll;
  virtualPos=reversePos ? virtualPos + deltaScroll : virtualPos - deltaScroll;
  lastScroll=xPos;
  final int width=getClientWidth();
  final float pageOffset=virtualPos / width;
  if (onCardChangeListener != null) {
    onCardChangeListener.onCardScrolled(currentItem,pageOffset,(int)virtualPos);
  }
  onPageScrolled();
  return true;
}

private boolean pageScrolled ( int xPos ) { if ( items . size ( ) == 0 ) { return false ; } final int deltaScroll = xPos - lastScroll ; virtualPos = reversePos ? virtualPos + deltaScroll : virtualPos - deltaScroll ; lastScroll = xPos ; final int width = getClientWidth ( ) ; final float pageOffset = virtualPos / width ; if ( onCardChangeListener != null ) { onCardChangeListener . onCardScrolled ( currentItem , pageOffset , ( int ) virtualPos ) ; } onPageScrolled ( ) ; return true ; }
called when page is scrolled . updates virtualpos of page according to scroll position .
