private void scroll(float x,float y,float amountX,float amountY,boolean isTilt){
  if ((!mScroller.isFinished() && isTilt) || mStackTabs == null || (mOverviewAnimationType != OverviewAnimationType.NONE && mOverviewAnimationType != OverviewAnimationType.DISCARD && mOverviewAnimationType != OverviewAnimationType.UNDISCARD && mOverviewAnimationType != OverviewAnimationType.DISCARD_ALL && mOverviewAnimationType != OverviewAnimationType.ENTER_STACK)) {
    return;
  }
  float amountScreen=mCurrentMode == Orientation.PORTRAIT ? amountY : amountX;
  float amountScroll=amountScreen;
  float amountEvenOut=amountScreen;
  float tabScrollSpaceFinal=0;
  if (mScrollingTab == null || isTilt) {
    mScrollingTab=getTabAtPositon(x,y);
  }
  if (mScrollingTab == null && mInSwipe && mStackTabs != null) {
    int index=mTabModel.index();
    if (index >= 0 && index <= mStackTabs.length)     mScrollingTab=mStackTabs[index];
  }
  if (mScrollingTab == null) {
    if (!isTilt) {
      amountScroll=0;
      amountEvenOut=0;
    }
  }
 else   if (mScrollingTab.getIndex() == 0) {
    amountEvenOut=0;
  }
 else {
    float tabScrollSpace=mScrollingTab.getScrollOffset() + mScrollOffset;
    float tabScreen=scrollToScreen(tabScrollSpace);
    tabScrollSpaceFinal=screenToScroll(tabScreen + amountScreen);
    amountScroll=tabScrollSpaceFinal - tabScrollSpace;
    amountScroll=Math.signum(amountScreen) * MathUtils.clamp(Math.abs(amountScroll),Math.abs(amountScreen) * 0.5f,Math.abs(amountScreen) * 2.0f);
  }
  if (evenOutTabs(amountEvenOut,false) && mScrollingTab.getIndex() > 0) {
    float tabScrollSpace=mScrollingTab.getScrollOffset() + mScrollOffset;
    amountScroll=tabScrollSpaceFinal - tabScrollSpace;
  }
  setScrollTarget(mScrollTarget + amountScroll,false);
}

private void scroll ( float x , float y , float amountX , float amountY , boolean isTilt ) { if ( ( ! mScroller . isFinished ( ) && isTilt ) || mStackTabs == null || ( mOverviewAnimationType != OverviewAnimationType . NONE && mOverviewAnimationType != OverviewAnimationType . DISCARD && mOverviewAnimationType != OverviewAnimationType . UNDISCARD && mOverviewAnimationType != OverviewAnimationType . DISCARD_ALL && mOverviewAnimationType != OverviewAnimationType . ENTER_STACK ) ) { return ; } float amountScreen = mCurrentMode == Orientation . PORTRAIT ? amountY : amountX ; float amountScroll = amountScreen ; float amountEvenOut = amountScreen ; float tabScrollSpaceFinal = 0 ; if ( mScrollingTab == null || isTilt ) { mScrollingTab = getTabAtPositon ( x , y ) ; } if ( mScrollingTab == null && mInSwipe && mStackTabs != null ) { int index = mTabModel . index ( ) ; if ( index >= 0 && index <= mStackTabs . length ) mScrollingTab = mStackTabs [ index ] ; } if ( mScrollingTab == null ) { if ( ! isTilt ) { amountScroll = 0 ; amountEvenOut = 0 ; } } else if ( mScrollingTab . getIndex ( ) == 0 ) { amountEvenOut = 0 ; } else { float tabScrollSpace = mScrollingTab . getScrollOffset ( ) + mScrollOffset ; float tabScreen = scrollToScreen ( tabScrollSpace ) ; tabScrollSpaceFinal = screenToScroll ( tabScreen + amountScreen ) ; amountScroll = tabScrollSpaceFinal - tabScrollSpace ; amountScroll = Math . signum ( amountScreen ) * MathUtils . clamp ( Math . abs ( amountScroll ) , Math . abs ( amountScreen ) * 0.5f , Math . abs ( amountScreen ) * 2.0f ) ; } if ( evenOutTabs ( amountEvenOut , false ) && mScrollingTab . getIndex ( ) > 0 ) { float tabScrollSpace = mScrollingTab . getScrollOffset ( ) + mScrollOffset ; amountScroll = tabScrollSpaceFinal - tabScrollSpace ; } setScrollTarget ( mScrollTarget + amountScroll , false ) ; }
called on touch / tilt scroll event .
