title: RecyclerView shows just a single row in Android
body: <p>I want to show a list of records using RecyclerView.</p>
  
  <p>But when i run the application, it shows just one record.</p>
  
  <p>I verified my code, and everything seems fine.</p>
  
  <p>Adapter Code:</p>
  
  <pre><code>    public class AdapterData extends RecyclerView.Adapter&lt;AdapterData.DummyHolder&gt; {
  
      private LayoutInflater layoutInflater;
      private ArrayList&lt;String&gt; mItems = new ArrayList&lt;&gt;();
      public Context ThisContext;
  
      public AdapterData(Context context)
      {
          layoutInflater = LayoutInflater.from(context);
          mItems = generateValues();
          ThisContext = context;
      }
  
      public static ArrayList&lt;String&gt; generateValues(){
          ArrayList&lt;String&gt; Dummy = new ArrayList&lt;&gt;();
          for(int i=1; i&lt;100; i++)
          {
              Dummy.add("Item"+i);
              Log.d("MTS", String.valueOf(i));
          }
          return Dummy;
      }
  
      @Override
      public DummyHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view= layoutInflater.inflate(R.layout.row_layout,parent,false);
          DummyHolder holder=new DummyHolder(view);
          return holder;
      }
  
      @Override
      public void onBindViewHolder(DummyHolder holder, int position) {
          holder.txt_name.setText(mItems.get(position));
          Log.d("MAN=",mItems.get(position));
      }
  
      @Override
      public int getItemCount() {
          return 100;
      }
  
      public static class DummyHolder extends RecyclerView.ViewHolder{
  
          TextView txt_name;
  
          public DummyHolder(View itemView) {
              super(itemView);
              txt_name = (TextView) itemView.findViewById(R.id.tx_name);
          }
      }
  }
  </code></pre>
  
  <p>Row Code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/tx_name"
          android:hint="Hello"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Main Actiivity XML :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
      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:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      tools:context="com.hogwarts.harrypotter.recyclerdemo.MainActivity"&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/rv_list"&gt;
  
      &lt;/android.support.v7.widget.RecyclerView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>MainActivity Code:</p>
  
  <pre><code> protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      recyclerView = (RecyclerView) findViewById(R.id.rv_list);
      LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
      recyclerView.setLayoutManager(linearLayoutManager);
      recyclerView.setAdapter(new AdapterData(this));
  }
  </code></pre>