private float[] getFabTranslationYForBottomNavigationBar(CoordinatorLayout parent,
                                                             FloatingActionButton fab) {
        float minOffset = 0;
        float viewHeight = 0;
        final List<View> dependencies = parent.getDependencies(fab);
        for (int i = 0, z = dependencies.size(); i < z; i++) {
            final View view = dependencies.get(i);
            if (view instanceof BottomNavigationBar) {
                viewHeight = view.getHeight();
                minOffset = Math.min(minOffset,
                        ViewCompat.getTranslationY(view) - viewHeight);
            }
        }
        float[] returnValues = {minOffset, viewHeight};

        return returnValues;
    }
Class description

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