code: private void adaptWidth() {
          adapter.setWidth(width);
  
          if (rootView != null) {
              rootView.setWidth(width);
              rootView.requestLayout();
          }
      }
docs: Adapts the width of the bottom sheet.