@Override public void onBindViewHolder(VH holder,int position){
  if (list.get(position).type == TYPE_ITEM) {
    onBindItemViewHolder(holder,position);
  }
 else   if (list.get(position).type == TYPE_HEADER) {
    onBindHeaderViewHolder(holder,position);
  }
}

@ Override public void onBindViewHolder ( VH holder , int position ) { if ( list . get ( position ) . type == TYPE_ITEM ) { onBindItemViewHolder ( holder , position ) ; } else if ( list . get ( position ) . type == TYPE_HEADER ) { onBindHeaderViewHolder ( holder , position ) ; } }
splits onbindviewholder method into two separate methods for items and headers .
