private void setTranslationY(int offset, boolean animate) {
        if (animate) {
            animateOffset(offset);
        } else {
            if (mTranslationAnimator != null) {
                mTranslationAnimator.cancel();
            }
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                this.setTranslationY(offset);
            }
        }
    }
@param offset  offset needs to be set
@param animate is animation enabled for translation
common/src/main/java/com/sxjs/common/widget/bottomnavigation/BottomNavigationBar.java