private void updateFabTranslationForBottomNavigationBar(CoordinatorLayout parent, FloatingActionButton fab, View dependency) {

        float snackBarTranslation = getFabTranslationYForSnackBar(parent, fab);
        float[] bottomBarParameters = getFabTranslationYForBottomNavigationBar(parent, fab);
        float bottomBarTranslation = bottomBarParameters[0];
        float bottomBarHeight = bottomBarParameters[1];

        float targetTransY = 0;
        if (snackBarTranslation >= bottomBarTranslation) {
            // when snackBar is below BottomBar in translation present.
            targetTransY = bottomBarTranslation;
        } else {
            targetTransY = snackBarTranslation;
        }

//        if (mFabBehaviour == BottomNavigationBar.FAB_BEHAVIOUR_DISAPPEAR) {
//            if (targetTransY == 0) {
//                fab.hide();
//            } else {
//                fab.show();
//            }
//        }

        final float currentTransY = ViewCompat.getTranslationY(fab);

        // Make sure that any current animation is cancelled
        ensureOrCancelAnimator(fab);


        if (fab.isShown()
                && Math.abs(currentTransY - targetTransY) > (fab.getHeight() * 0.667f)) {
            // If the FAB will be travelling by more than 2/3 of it's height, let's animate it instead
            mFabTranslationYAnimator.translationY(targetTransY).start();
        } else {
            // Now update the translation Y
            ViewCompat.setTranslationY(fab, targetTransY);
        }
    }
Class description

@author ashokvarma
@version 1.0
@since 06 Jun 2016
common/src/main/java/com/sxjs/common/widget/bottomnavigation/behaviour/BottomNavBarFabBehaviour.java