Code example for Scroller

Methods: abortAnimation

0
 
    protected abstract void onUpEvent(MotionEvent ev , VelocityTracker tracker);
 
    protected void stopAnimation() { 
        removeCallbacks(mDragRunnable);
        mScroller.abortAnimation();
    } 
     
    @SuppressLint("NewApi") 
	@Override 
    public void postOnAnimation(Runnable action) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            super.postOnAnimation(action);
        } else { 
            postDelayed(action, ANIMATION_DELAY);
        } 
    } 
     
    private final Runnable mDragRunnable = new Runnable() {
        public void run() { 
            postAnimationInvalidate();