@Override
 public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
   if (isEmpty()) {
     ViewHolder holder;
     if (mEmptyView != null) {
       holder = ViewHolder.createViewHolder(parent.getContext(), mEmptyView);
     } else {
       holder = ViewHolder.createViewHolder(parent.getContext(), parent, mEmptyLayoutId);
     }
     return holder;
   }
   return mInnerAdapter.onCreateViewHolder(parent, viewType);
 }
  @Override
  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    if (mHeaderViews.get(viewType) != null) {
      ViewHolder holder =
          ViewHolder.createViewHolder(parent.getContext(), mHeaderViews.get(viewType));
      return holder;

    } else if (mFootViews.get(viewType) != null) {
      ViewHolder holder =
          ViewHolder.createViewHolder(parent.getContext(), mFootViews.get(viewType));
      return holder;
    }
    return mInnerAdapter.onCreateViewHolder(parent, viewType);
  }