@Override public VH onCreateViewHolder(ViewGroup parent,int viewType){
  if (viewType == TYPE_ITEM) {
    return onCreateItemViewHolder(parent);
  }
 else   if (viewType == TYPE_HEADER) {
    return onCreateHeaderViewHolder(parent);
  }
  throw new RuntimeException("there is no type that matches the type " + viewType);
}

@ Override public VH onCreateViewHolder ( ViewGroup parent , int viewType ) { if ( viewType == TYPE_ITEM ) { return onCreateItemViewHolder ( parent ) ; } else if ( viewType == TYPE_HEADER ) { return onCreateHeaderViewHolder ( parent ) ; } throw new RuntimeException ( "there is no type that matches the type " + viewType ) ; }
splits oncreateviewholder method into two separate methods for items and headers .
