protected int calculateNewPagerPosition(int newActiveElement){
  newActiveElement++;
  if (newActiveElement <= 0)   newActiveElement=1;
  int pagerActiveElemCenterPosX=mPagerElementActiveSize / 2 + newActiveElement * mPagerElementLeftMargin + (newActiveElement - 1) * (mPagerElementNormalSize + mPagerElementRightMargin);
  return mRootLayout.getWidth() / 2 - pagerActiveElemCenterPosX;
}

protected int calculateNewPagerPosition ( int newActiveElement ) { newActiveElement ++ ; if ( newActiveElement <= 0 ) newActiveElement = 1 ; int pagerActiveElemCenterPosX = mPagerElementActiveSize / 2 + newActiveElement * mPagerElementLeftMargin + ( newActiveElement - 1 ) * ( mPagerElementNormalSize + mPagerElementRightMargin ) ; return mRootLayout . getWidth ( ) / 2 - pagerActiveElemCenterPosX ; }
calculate new position for pager without using pager ' s current position ( like . getx ( ) ) this method allows to avoid incorrect position values while animation of pager in progress
