Code example for Scroller

Methods: abortAnimation

0
		animateContent(true, 0); 
	} 
 
	private void stopAnimation() { 
		removeCallbacks(mDragRunnable);
		mScroller.abortAnimation();
	} 
 
	private void animateContent(boolean open, int velocity) {
		endDrag(); 
 
		final int startX = mContentLeft;
		int dx = open ? mMenuWidth - startX : startX;
 
		if (dx == 0)
			return; 
 
		int duration;
 
		if (velocity > 0) {
			duration = 4 * Math.round(1000.f * Math.abs((float) dx) / velocity);