content: package cn.gzzgtech.bottomandshapedemo.util;
  
  import android.annotation.SuppressLint;
  import android.os.Build;
  import android.support.annotation.RequiresApi;
  import android.support.design.internal.BottomNavigationItemView;
  import android.support.design.internal.BottomNavigationMenuView;
  import android.support.design.widget.BottomNavigationView;
  
  import java.lang.reflect.Field;
  
  
  public class BottomNavigationViewHelper {
  
      @RequiresApi(api = Build.VERSION_CODES.KITKAT)
      @SuppressLint("RestrictedApi")
      public static void disableShiftMode(BottomNavigationView navigationView) {
  
          BottomNavigationMenuView menuView = (BottomNavigationMenuView) navigationView.getChildAt(0);
          try {
              // 利用反射，改变 item 中 mShiftingMode 的值 ,从而改变 BottomNavigationView 默认的效果
              Field shiftingMode = menuView.getClass().getDeclaredField("mShiftingMode");
              shiftingMode.setAccessible(true);
              shiftingMode.setBoolean(menuView, false);
              shiftingMode.setAccessible(false);
  
              for (int i = 0; i < menuView.getChildCount(); i++) {
                  BottomNavigationItemView itemView = (BottomNavigationItemView) menuView.getChildAt(i);
                  itemView.setShiftingMode(false);
                  itemView.setChecked(itemView.getItemData().isChecked());
              }
  
          } catch (NoSuchFieldException | IllegalAccessException e) {
              e.printStackTrace();
          }
      }
  }