private boolean moveToFinalScrollerPosition(Scroller scroller){
  scroller.forceFinished(true);
  if (isHorizontalMode()) {
    int amountToScroll=scroller.getFinalX() - scroller.getCurrX();
    int futureScrollOffset=(mCurrentScrollOffset + amountToScroll) % mSelectorElementSize;
    int overshootAdjustment=mInitialScrollOffset - futureScrollOffset;
    if (overshootAdjustment != 0) {
      if (Math.abs(overshootAdjustment) > mSelectorElementSize / 2) {
        if (overshootAdjustment > 0) {
          overshootAdjustment-=mSelectorElementSize;
        }
 else {
          overshootAdjustment+=mSelectorElementSize;
        }
      }
      amountToScroll+=overshootAdjustment;
      scrollBy(amountToScroll,0);
      return true;
    }
  }
 else {
    int amountToScroll=scroller.getFinalY() - scroller.getCurrY();
    int futureScrollOffset=(mCurrentScrollOffset + amountToScroll) % mSelectorElementSize;
    int overshootAdjustment=mInitialScrollOffset - futureScrollOffset;
    if (overshootAdjustment != 0) {
      if (Math.abs(overshootAdjustment) > mSelectorElementSize / 2) {
        if (overshootAdjustment > 0) {
          overshootAdjustment-=mSelectorElementSize;
        }
 else {
          overshootAdjustment+=mSelectorElementSize;
        }
      }
      amountToScroll+=overshootAdjustment;
      scrollBy(0,amountToScroll);
      return true;
    }
  }
  return false;
}

private boolean moveToFinalScrollerPosition ( Scroller scroller ) { scroller . forceFinished ( true ) ; if ( isHorizontalMode ( ) ) { int amountToScroll = scroller . getFinalX ( ) - scroller . getCurrX ( ) ; int futureScrollOffset = ( mCurrentScrollOffset + amountToScroll ) % mSelectorElementSize ; int overshootAdjustment = mInitialScrollOffset - futureScrollOffset ; if ( overshootAdjustment != 0 ) { if ( Math . abs ( overshootAdjustment ) > mSelectorElementSize / 2 ) { if ( overshootAdjustment > 0 ) { overshootAdjustment -= mSelectorElementSize ; } else { overshootAdjustment += mSelectorElementSize ; } } amountToScroll += overshootAdjustment ; scrollBy ( amountToScroll , 0 ) ; return true ; } } else { int amountToScroll = scroller . getFinalY ( ) - scroller . getCurrY ( ) ; int futureScrollOffset = ( mCurrentScrollOffset + amountToScroll ) % mSelectorElementSize ; int overshootAdjustment = mInitialScrollOffset - futureScrollOffset ; if ( overshootAdjustment != 0 ) { if ( Math . abs ( overshootAdjustment ) > mSelectorElementSize / 2 ) { if ( overshootAdjustment > 0 ) { overshootAdjustment -= mSelectorElementSize ; } else { overshootAdjustment += mSelectorElementSize ; } } amountToScroll += overshootAdjustment ; scrollBy ( 0 , amountToScroll ) ; return true ; } } return false ; }
move to the final position of a scroller . ensures to force finish the scroller and if it is not at its final position a scroll of the selector wheel is performed to fast forward to the final position .
