Recently I use RecyclerView and add a custom header view (another type of item view) and try to updated it when data has changed. Something strange happens. The adapter crea
Here are a few issues with your implementation:
getItemCount expects the count of all items in the recyclerview including the header so you should return mItemList.size() + 1
the position field in onBindViewHolder() refers to the position of an element in the whole recyclerview including the header. so to bind a non-header item you will do something like item = mItemList.get(position - 1)
-- this won't fail because getItemViewType returns a number greater than 0 for TYPE_ITEMs
By doing so, notifyItemChanged should behave as expected