Code example for Scroller

Methods: flinggetDuration

0
			} 
 
			boolean scrollBeyondImage = (fixedScrollX < 0) || (fixedScrollX > maxScrollX) || (fixedScrollY < 0) || (fixedScrollY > maxScrollY);
			if (scrollBeyondImage) return false;
			 
			scroller.fling(getScrollX(), getScrollY(), -(int)velocityX, -(int)velocityY, 0, getScaledWidth() - getWidth(), 0, getScaledHeight() - getHeight());
			awakenScrollBars(scroller.getDuration());
			 
			return true; 
		} 
	} 
 
	private class MyScaleGestureListener implements OnScaleGestureListener
	{ 
		public boolean onScale(ScaleGestureDetector detector)
		{ 
			scaleFactor *= detector.getScaleFactor();
 
			int newScrollX = (int)((getScrollX() + detector.getFocusX()) * detector.getScaleFactor() - detector.getFocusX());
			int newScrollY = (int)((getScrollY() + detector.getFocusY()) * detector.getScaleFactor() - detector.getFocusY());
Contextual code suggestions in your IDE  Get Codota for Java