title: Populate RecyclerView and CardView with ArrayList<String>
body: <p>I have a cardview with 2 textviews inside. The first textview displays the name of a contact and the second displays the phone number. I want to use an ArrayList to populate the recyclerview. </p>
  
  <hr>
  
  <p>I'm still new to Android programming so I don't know how to implement RecyclerView or make an adapter that will alternate between name and number filling in the textview. How can I achieve this?</p>
  
  <p>My CardView (card_row.xml)</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.CardView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:card_view="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_margin="5dp"
      android:clickable="true"
      android:orientation="horizontal"
      card_view:cardCornerRadius="0dp"
      card_view:cardUseCompatPadding="true" &gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="?android:selectableItemBackground"
      android:orientation="vertical"&gt;
  
      &lt;TextView
          android:id="@+id/text1"
          android:layout_width="match_parent"
          android:layout_height="38dp"
          android:layout_margin="5dp"
          android:gravity="left"
          android:textColor="@android:color/black"
          android:textSize="24sp" /&gt;
      &lt;TextView
          android:id="@+id/text2"
          android:layout_width="match_parent"
          android:layout_height="37dp"
          android:layout_margin="5dp"
          android:layout_below="@id/text1"
          android:textColor="@android:color/darker_gray"
          android:textSize="18sp" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>EDIT:
  I made 2 arraylists, one for names and the other for numbers. Now I how do I populate the recyclerview?</p>