public void addHeader(Object header){
  if (mMode != YfListMode.MODE_DATA) {
    Log.e(TAG,"error: you can not add header or footer while you are not in data mode");
    return;
  }
  if (!mHeaders.contains(header)) {
    mHeaders.add(header);
    notifyItemInserted(mHeaders.size() - 1);
  }
}

public void addHeader ( Object header ) { if ( mMode != YfListMode . MODE_DATA ) { Log . e ( TAG , "error: you can not add header or footer while you are not in data mode" ) ; return ; } if ( ! mHeaders . contains ( header ) ) { mHeaders . add ( header ) ; notifyItemInserted ( mHeaders . size ( ) - 1 ) ; } }
add a header to the adapter
