public void bottomOne(View v) {
   if (mBottomSheetBehavior.getState() == BottomSheetBehavior.STATE_HIDDEN) {
     mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
   } else {
     mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
   }
 }
 @Override
 public void onClick(View v) {
   behavior.setState(
       state == BottomSheetBehavior.STATE_COLLAPSED
           ? BottomSheetBehavior.STATE_EXPANDED
           : BottomSheetBehavior.STATE_COLLAPSED);
 }
  private void initBottomSheet() {
    mBottomSheetBehavior = BottomSheetBehavior.from(findViewById(R.id.design_bottom_sheet));
    // 默认设置为隐藏
    mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
    mBottomSheetBehavior.setBottomSheetCallback(
        new BottomSheetBehavior.BottomSheetCallback() {
          @Override
          public void onStateChanged(@NonNull View bottomSheet, int newState) {
            Log.i(
                TAG,
                "onStateChanged bottomSheet "
                    + bottomSheet.getClass().getSimpleName()
                    + " newState "
                    + newState);
          }

          @Override
          public void onSlide(@NonNull View bottomSheet, float slideOffset) {
            Log.i(
                TAG,
                "onSlide bottomSheet "
                    + bottomSheet.getClass().getSimpleName()
                    + " newState "
                    + slideOffset);
          }
        });

    // 设置为 true 之后,点击或拖动时会被直接关闭
    //        mBottomSheetBehavior.setSkipCollapsed(true);
  }