docs: public void setAdapter(StickyListHeadersAdapter adapter) {
          if (adapter == null) {
              if (mAdapter instanceof SectionIndexerAdapterWrapper) {
                  ((SectionIndexerAdapterWrapper) mAdapter).mSectionIndexerDelegate = null;
              }
              if (mAdapter != null) {
                  mAdapter.mDelegate = null;
              }
              mList.setAdapter(null);
              clearHeader();
              return;
          }
          if (mAdapter != null) {
              mAdapter.unregisterDataSetObserver(mDataSetObserver);
          }
  
          if (adapter instanceof SectionIndexer) {
              mAdapter = new SectionIndexerAdapterWrapper(getContext(), adapter);
          } else {
              mAdapter = new AdapterWrapper(getContext(), adapter);
          }
          mDataSetObserver = new AdapterWrapperDataSetObserver();
          mAdapter.registerDataSetObserver(mDataSetObserver);
  
          if (mOnHeaderClickListener != null) {
              mAdapter.setOnHeaderClickListener(new AdapterWrapperHeaderClickHandler());
          } else {
              mAdapter.setOnHeaderClickListener(null);
          }
  
          mAdapter.setDivider(mDivider, mDividerHeight);
  
          mList.setAdapter(mAdapter);
          clearHeader();
      }