public void setAdapter(SpinnerAdapter adapter) {
		if(mAdapter != null)
			mAdapter.unregisterDataSetObserver(mDataSetObserver);

        mRecycler.clear();

		mAdapter = adapter;
		mAdapter.registerDataSetObserver(mDataSetObserver);
		onDataChanged();

        if (mPopup != null)
            mPopup.setAdapter(new DropDownAdapter(adapter));
        else
            mTempAdapter = new DropDownAdapter(adapter);
	}
public void setAdapter ( SpinnerAdapter adapter ) { if ( mAdapter != null ) mAdapter . unregisterDataSetObserver ( mDataSetObserver ) ; mRecycler . clear ( ) ; mAdapter = adapter ; mAdapter . registerDataSetObserver ( mDataSetObserver ) ; onDataChanged ( ) ; if ( mPopup != null ) mPopup . setAdapter ( new DropDownAdapter ( adapter ) ) ; else mTempAdapter = new DropDownAdapter ( adapter ) ; }
Set an adapter for this Spinner.
@param adapter