code: public static RecyclerViewHeader fromXml(Context context, @LayoutRes int layoutRes) {
          RecyclerViewHeader header = new RecyclerViewHeader(context);
          View.inflate(context, layoutRes, header);
          return header;
      }
docs: Inflates layout from <code>xml</code> and encapsulates it with <code>RecyclerViewHeader</code>.
  
  @param context   application context.
  @param layoutRes layout resource to be inflated.
  @return <code>RecyclerViewHeader</code> view object.