private void handleDirection(CoordinatorLayout parent, V child, int scrollDirection) {
        BottomNavigationBar bottomNavigationBar = mViewRef.get();
        if (bottomNavigationBar != null && bottomNavigationBar.isAutoHideEnabled()) {
            if (scrollDirection == ScrollDirection.SCROLL_DIRECTION_DOWN && bottomNavigationBar.isHidden()) {
                updateSnackBarPosition(parent, child, getSnackBarInstance(parent, child), -mBottomNavHeight);
                bottomNavigationBar.show();
            } else if (scrollDirection == ScrollDirection.SCROLL_DIRECTION_UP && !bottomNavigationBar.isHidden()) {
                updateSnackBarPosition(parent, child, getSnackBarInstance(parent, child), 0);
                bottomNavigationBar.hide();
            }
        }
    }
Class description

@author ashokvarma
@version 1.0
@see VerticalScrollingBehavior
@since 25 Mar 2016
common/src/main/java/com/sxjs/common/widget/bottomnavigation/behaviour/BottomVerticalScrollBehavior.java