code: public <T> void setAdapter(MaterialSpinnerAdapter<T> adapter) {
      this.adapter = adapter;
      this.adapter.setTextColor(textColor);
      this.adapter.setBackgroundSelector(backgroundSelector);
      this.adapter.setPopupPadding(popupPaddingLeft, popupPaddingTop, popupPaddingRight, popupPaddingBottom);
      setAdapterInternal(adapter);
    }
docs: Set the custom adapter for the dropdown items
  
  @param adapter The adapter
  @param <T> The type