code: public final void setAdapter(final SpinnerAdapter adapter) {
          getView().setAdapter(
                  new ProxySpinnerAdapter(getContext(), adapter, R.layout.spinner_hint_item,
                          getHint(), getHintTextColors()));
      }
docs: Sets the Adapter used to provide the data which backs this Spinner. <p> Note that Spinner
  overrides Adapter#getViewTypeCount() on the Adapter associated with this view. Calling
  Adapter#getItemViewType(int) getItemViewType(int) on the object returned from {@link
  #getAdapter()} will always return 0. Calling Adapter#getViewTypeCount() getViewTypeCount()
  will always return 1. On API {@link Build.VERSION_CODES#LOLLIPOP} and above, attempting to
  set an adapter with more than one view type will throw an {@link IllegalArgumentException}.
  
  @param adapter
  the adapter to set
  @throws IllegalArgumentException
  if the adapter has more than one view type
  @see AbsSpinner#setAdapter(SpinnerAdapter)