title: Passing a null view to RecyclerView.ViewHolder crashes the app when calling super
body: <p>Since I am creating my views programmatically for my <code>RecyclerView.ViewHolder</code> I don't need to pass any view to it in <code>onCreateViewHolder</code> but when it calls through to super it crashes with this error:</p>
  
  <pre><code>IllegalArgumentException: itemView may not be null
  </code></pre>
  
  <p>Here is some code:</p>
  
  <pre><code>        @Override
      public ImagePreviewViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          return new ImagePreviewViewHolder(null);
      }
  
  
  protected class ImagePreviewViewHolder extends RecyclerView.ViewHolder {
      public LinearLayout page;
      public ImageView imageView;
  
      public ImagePreviewViewHolder(View itemView) {
          super(itemView); // HERE IT CRASHES
          page = createPage();
          imageView = createImageView();
          page.addView(imageView);
      }
  }
  </code></pre>
  
  <p>@DanailAlexiev, is this what you meant:</p>
  
  <pre><code>    @Override
      public ImagePreviewViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          LinearLayout page = createPage();
          ImageView imageView = createImageView();
          page.addView(imageView);
          return new ImagePreviewViewHolder(page);
      }
  
  protected class ImagePreviewViewHolder extends RecyclerView.ViewHolder {
  
      LinearLayout page;
      ImageView imageView;
  
      public ImagePreviewViewHolder(View itemView) {
          super(itemView);
          page = (LinearLayout) itemView;
          imageView = (ImageView) page.getChildAt(0);
      }
  }
  </code></pre>