Code example for Scroller

Methods: fling

0
		@Override 
		public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { 
 
			final int maxScrollDistance = getMeasuredHeight()*1; 
			mLastY = 0; 
			mScroller.fling(0, mdY, 0, Math.round(velocityY), 0, 0, -maxScrollDistance, maxScrollDistance); 
			requestLayout(); 
			 
			 
			return true; 
		} 
 
		@Override 
		public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { 
			mdY -= Math.round(distanceY); 
			requestLayout(); 
			return true; 
 
		} 
 
		@Override