code: @Override public final void onViewRecycled(VH holder) {
      int position = holder.getAdapterPosition();
  
      if (isHeaderPosition(position)) {
        onHeaderViewRecycled(holder);
      } else if (isFooterPosition(position)) {
        onFooterViewRecycled(holder);
      } else {
        onItemViewRecycled(holder);
      }
    }
docs: Invokes onHeaderViewRecycled, onItemViewRecycled or onFooterViewRecycled methods based
  on the holder.getAdapterPosition()