title: card view not showing up
body: <p>I am implementing card view through recycler view in android but my card view is not showing up. I am using custom adapter to populate data to card view. I have tried all things but the card view is not showing up.</p>
  
  <pre><code>MainActivity.java:
  public class MainActivity extends Activity {
  private String[] mImage = {"sahil", "kunal", "somy", "manav"};
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      //setting adapter
      RecyclerView recyclerView = (RecyclerView)findViewById(R.id.recycler);
      GridLayoutManager manager = new GridLayoutManager(this, 2);
      recyclerView.setAdapter(new Adapter(mImage));
      recyclerView.setHasFixedSize(true);
      recyclerView.setLayoutManager(manager);
  }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>activity_main.xml:</p>
  
  <p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/recycler"
      android:scrollbars="vertical"
       tools:context=".MainActivity"&gt;</code></p>
  
  <p>'</p>
  
  <pre><code>grid_item.xml:
  </code></pre>
  
  <p>'
  </p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/text"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>'</p>
  
  <pre><code>Adapter.java:
  public class Adapter extends RecyclerView.Adapter&lt;Adapter.Holder&gt; {
  private String[] mImage;
  
  public Adapter(String[] mImage) {
      this.mImage = mImage;
  }
  
  public static class Holder extends RecyclerView.ViewHolder{
    public CardView cardView;
    public TextView textView;
  
      public Holder(View itemView) {
          super(itemView);
          cardView = (CardView)itemView.findViewById(R.id.card);
          textView = (TextView)itemView.findViewById(R.id.text);
      }
  }
  
  @Override
  public Holder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.grid_item, parent, false);
      Holder holder = new Holder(view);
      return holder;
  }
  
  @Override
  public void onBindViewHolder(Holder holder, int position) {
      holder.textView.setText(mImage[position]);
  }
  
  @Override
  public void onAttachedToRecyclerView(RecyclerView recyclerView) {
      super.onAttachedToRecyclerView(recyclerView);
  }
  
  @Override
  public int getItemCount() {
      return 0;
  }
  </code></pre>
  
  <p>}</p>