private boolean scrollAndFocus(int direction, int top, int bottom) {
        boolean handled = true;

        int height = getHeight();
        int containerTop = getScrollY();
        int containerBottom = containerTop + height;
        boolean up = direction == View.FOCUS_UP;

        View newFocused = findFocusableViewInBounds(up, top, bottom);
        if (newFocused == null) {
            newFocused = this;
        }

        if (top >= containerTop && bottom <= containerBottom) {
            handled = false;
        } else {
            int delta = up ? (top - containerTop) : (bottom - containerBottom);
            doScrollY(delta);
        }

        if (newFocused != findFocus()) newFocused.requestFocus(direction);

        return handled;
    }
<p>Scrolls the view to make the area defined by <code>top</code> and
<code>bottom</code> visible. This method attempts to give the focus
to a component visible in this area. If no component can be focused in
the new visible area, the focus is reclaimed by this ScrollView.</p>

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