public boolean fullScroll(int direction) {
        boolean down = direction == View.FOCUS_DOWN;
        int height = getHeight();

        mTempRect.top = 0;
        mTempRect.bottom = height;

        if (down) {
            int count = getChildCount();
            if (count > 0) {
                View view = getChildAt(count - 1);
                mTempRect.bottom = view.getBottom() + getPaddingBottom();
                mTempRect.top = mTempRect.bottom - height;
            }
        }

        return scrollAndFocus(direction, mTempRect.top, mTempRect.bottom);
    }
<p>Handles scrolling in response to a "home/end" shortcut press. This
method will scroll the view to the top or bottom and give the focus
to the topmost/bottommost component in the new visible area. If no
component is a good candidate for focus, this scrollview reclaims the
focus.</p>

@param direction the scroll direction: {@link View#FOCUS_UP}
                 to go the top of the view or
                 {@link View#FOCUS_DOWN} to go the bottom
@return true if the key event is consumed by this method, false otherwise
app/src/main/java/home/smart/fly/animations/widget/NestedScrollView.java