title: RecyclerView Adapter gives error "The hierarchy of the type RecycleAdapter is inconsistent"
body: <p>I am trying to add the new <code>RecyclerView</code> to my project inside a <code>Fragement</code>. I am following a video tutorial on <a href="https://www.youtube.com/watch?v=Wq2o4EbM74k" rel="nofollow">Link1</a> . When I try to create an adapter for the <code>RecyclerView</code>, I start getting this error. I am using Eclipse Juno. I cant figure out the problem. Please help</p>
  
  <p>My code:</p>
  
  <pre><code>public class RecycleAdapter extends RecyclerView.Adapter&lt;RecycleAdapter.MyViewHolder&gt; {
  
  private LayoutInflater inflator;
  List &lt;Item&gt; data = Collections.EMPTY_LIST;
  
  public RecycleAdapter(Context context, List&lt;Item&gt; data){
      inflator = LayoutInflater.from(context);
  }
  
  @Override
  public int getItemCount() {
      // TODO Auto-generated method stub
      return data.size();
  }
  
  
  @Override
  public MyViewHolder onCreateViewHolder(ViewGroup parent, int arg1) {
      View view = inflator.inflate(R.layout.row_staggered_new, parent, false);
      MyViewHolder holder = MyViewHolder(view);
      return holder;
  }
  
  @Override
  public void onBindViewHolder(MyViewHolder holder, int position) {
      Item current = data.get(position);
      holder.text.setText(current.title);
      holder.image.setImageResource(current.image);
  
  }
  
  public static class MyViewHolder extends RecyclerView.ViewHolder{
  
      public ImageView image;
      public TextView text;
  
      public MyViewHolder(View itemView) {
          super(itemView);
          image = (ImageView) itemView.findViewById(R.id.imageView1);
          text = (TextView) itemView.findViewById(R.id.textview1);
      }
  }
  }
  </code></pre>
  
  <p>Both <code>MyViewHolder</code> and <code>RecycleAdapter</code> are giving error <code>"The hierarchy of the type RecycleAdapter is inconsistent"</code>. 
  In the extends part of the <code>RecycleAdapter</code>, it shows error 
  <code>"Bound mismatch: The type RecycleAdapter.MyViewHolder is not a valid substitute for the bounded parameter &lt;VH extends RecyclerView.ViewHolder&gt; of the type RecyclerView.Adapter&lt;VH&gt;"</code>. </p>
  
  <p>Any pointers?</p>