code: public void setAdapter(@NonNull ListAdapter adapter) {
      this.adapter = new MaterialSpinnerAdapterWrapper(getContext(), adapter)
          .setPopupPadding(popupPaddingLeft, popupPaddingTop, popupPaddingRight, popupPaddingBottom)
          .setBackgroundSelector(backgroundSelector)
          .setTextColor(textColor);
      setAdapterInternal(this.adapter);
    }
docs: Set a custom adapter for the dropdown items
  
  @param adapter The list adapter