public void setAdapter ( RecyclerView . Adapter adapter ) { if ( mWrappedAdapter != null && mWrappedAdapter . getItemCount ( ) > 0 ) { notifyItemRangeRemoved ( getHeaderCount ( ) , mWrappedAdapter . getItemCount ( ) ) ; } setWrappedAdapter ( adapter ) ; notifyItemRangeInserted ( getHeaderCount ( ) , mWrappedAdapter . getItemCount ( ) ) ; }
Replaces the underlying adapter notifying RecyclerView of changes