public void fling(int velocityY) {
        if (getChildCount() > 0) {
            int height = getHeight() - getPaddingBottom() - getPaddingTop();
            int bottom = getChildAt(0).getHeight();
            mScroller.fling(getScrollX(), getScrollY(), 0, velocityY, 0, 0, 0,
                    Math.max(0, bottom - height), 0, height / 2);

            ViewCompat.postInvalidateOnAnimation(this);
        }
    }
Fling the scroll view

@param velocityY The initial velocity in the Y direction. Positive
                 numbers mean that the finger/cursor is moving down the screen,
                 which means we want to scroll towards the top.
app/src/main/java/home/smart/fly/animations/widget/NestedScrollView.java