You'll need to do is deprecate onCreateHeaderViewHolder(ViewGroup parent) and add a new method: onCreateHeaderViewHolder(ViewGroup parent, int viewType)
The viewType can be derived from the adapter like so:
mAdapter.getItemViewType(position);
This makes it consistent with the onCreateViewHolder(ViewGroup parent, int viewType) method.
(As a side note, you should really add nullability annotations. Nice implementation otherwise!)
You'll need to do is deprecate
onCreateHeaderViewHolder(ViewGroup parent)
and add a new method:onCreateHeaderViewHolder(ViewGroup parent, int viewType)
The viewType can be derived from the adapter like so:
This makes it consistent with the
onCreateViewHolder(ViewGroup parent, int viewType)
method.(As a side note, you should really add nullability annotations. Nice implementation otherwise!)