@Override
  public int getItemViewType(int position) {
    if (position >= model.size()) {
      return VIEW_TYPE_FOOTER;
    }

    return VIEW_TYPE_ITEM;
  }
 @Override
 public int getItemCount() {
   return (footerEnabled) ? model.size() + 1 : model.size();
 }