public void scrollViewToSide ( View view , Side side , float scrollPosition , int stepCount ) { int [ ] corners = new int [ 2 ] ; view . getLocationOnScreen ( corners ) ; int viewHeight = view . getHeight ( ) ; int viewWidth = view . getWidth ( ) ; float x = corners [ 0 ] + viewWidth * scrollPosition ; float y = corners [ 1 ] + viewHeight / 2.0f ; if ( side == Side . LEFT ) drag ( corners [ 0 ] , x , y , y , stepCount ) ; else if ( side == Side . RIGHT ) drag ( x , corners [ 0 ] , y , y , stepCount ) ; }
Scrolls view horizontally .