title: Getting position in onCreateViewHolder
body: <p>I am transforming my ListView to RecyclerView using Support Library v7. </p>
  
  <p>I have 2 different layouts to load in a <code>RecyclerView</code>. In <code>ListView</code>, I was getting the position of the item in the <code>getView()</code> method and able to load an appropriate layout for that row. But in <code>RecyclerView</code>the <code>onCreateViewHolder</code> doesn't have the position parameter.</p>
  
  <p>Is there any other way to achieve this?</p>
  
  <p>PS:The Inbox app from Google shows different layouts in a <code>RecyclerView</code>(might be). I don't think they might have used the <code>ListView</code> because of the performance improvements in <code>RecyclerView</code></p>
  
  <pre><code>@Override
      public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
          View v=null;
  
              MyVO vo = voList.get(???POSITION???);
  
              switch(vo.getType()){
                  case TYPE_1:
                      v = LayoutInflater.from(viewGroup.getContext())
                              .inflate(R.layout.layout1, viewGroup, false);
                      break;
                  case TYPE_2:
                      v = LayoutInflater.from(viewGroup.getContext())
                              .inflate(R.layout.layout2, viewGroup, false);
                      break;
              }
          return new ViewHolder(v);
      }
  </code></pre>