code: private void addItems(@NonNull final BottomSheet.Builder builder) {
          int dividerCount = getDividerCount();
          boolean showDividerTitle = shouldDividerTitleBeShown();
          int itemCount = getItemCount();
          boolean showIcon = shouldItemIconsBeShown();
          boolean disableItems = shouldItemsBeDisabled();
          int index = 0;
  
          for (int i = 0; i < dividerCount + 1; i++) {
              if (i > 0) {
                  builder.addDivider(showDividerTitle ? getString(R.string.divider_title, i) : null);
                  index++;
              }
  
              for (int j = 0; j < itemCount; j++) {
                  String title = getString(R.string.item_title, i * itemCount + j + 1);
                  Drawable icon;
  
                  if (isDarkThemeSet()) {
                      icon = showIcon ? ContextCompat.getDrawable(getActivity(),
                              getStyle() == Style.GRID ? R.drawable.grid_item_dark :
                                      R.drawable.list_item_dark) : null;
                  } else {
                      icon = showIcon ? ContextCompat.getDrawable(getActivity(),
                              getStyle() == Style.GRID ? R.drawable.grid_item :
                                      R.drawable.list_item) : null;
                  }
  
                  builder.addItem(i * dividerCount + j, title, icon);
  
                  if (disableItems) {
                      builder.setItemEnabled(index, false);
                  }
  
                  index++;
              }
          }
  
          builder.setOnItemClickListener(createItemClickListener());
      }
docs: Adds items, depending on the app's settings, to a builder, which allows to create a bottom
  sheet.
  
  @param builder
  The builder, which allows to create the bottom sheet, as an instance of the class
  {@link BottomSheet.Builder}. The builder may not be null