public int lastViewablePageIndex(){
  return getSwipeToDismiss() ? Math.abs(lastPageIndex() - 1) : lastPageIndex();
}

public int lastViewablePageIndex ( ) { return getSwipeToDismiss ( ) ? Math . abs ( lastPageIndex ( ) - 1 ) : lastPageIndex ( ) ; }
get the index of the last viewable page , dependent on if the layout is rtl
