title: Recyclerview shows each item at full screen
body: <p>I have a requirement to use ConstraintLayouts for all layout files. I have created a layout file as follows:</p>
  
  <pre><code>&lt;androidx.constraintlayout.widget.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:padding="12dp"&gt;
  
      &lt;ImageView
          android:id="@+id/contactThumbImage"
          android:layout_width="64dp"
          android:layout_height="64dp"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:srcCompat="@drawable/someimage"
          tools:srcCompat="@drawable/someimage" /&gt;
  
      &lt;TextView
          android:id="@+id/txtContactName"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:text="TextView"
          android:textColor="@color/black"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toEndOf="@+id/contactThumbImage"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
          &lt;TextView
              android:id="@+id/txtContactEmail"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:text="TextView"
              android:textColor="@color/black"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toEndOf="@+id/contactThumbImage"
              app:layout_constraintTop_toBottomOf="@+id/txtContactName" /&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>My adapter is as follows:</p>
  
  <pre><code>class ContactsAdapter(var contacts: List&lt;ContactEntry&gt;): RecyclerView.Adapter&lt;ContactsAdapter.ViewHolder&gt;() {
  
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
          val view = LayoutInflater.from(parent.context)
                  .inflate(R.layout.contacts_list_item, parent, false)
  
          return ViewHolder(view)
      }
  
      override fun getItemCount(): Int {
          return contacts.size
      }
  
      override fun onBindViewHolder(holder: ViewHolder, position: Int) {
          val contact = contacts[position]
          holder.mName.text = "${contact.firstName} ${contact.lastName}"
          holder.mAddress.text = contact.email
      }
  
      class ViewHolder(view: View): RecyclerView.ViewHolder(view) {
          var contactImage: ImageView
          var mName: TextView
          var mAddress: TextView
  
          init{
              contactImage = view.findViewById(R.id.contactThumbImage)
              mName = view.findViewById(R.id.txtContactName)
              mAddress = view.findViewById(R.id.txtContactEmail)
          }
      }
  }
  </code></pre>
  
  <p>And in my activity's onCreate method:</p>
  
  <pre><code>    emailContactsRecycler.layoutManager = LinearLayoutManager(this)
  
      ContactsManager.getContactsWithEmailAddresses(this).let { contacts -&gt;
          if (contacts.size &lt; 1) {
              Toast.makeText(this, "Currently you have no email contacts to list", Toast.LENGTH_SHORT).show()
          } else {
              emailContactsRecycler.adapter = ContactsAdapter(contacts)
          }
      }
  </code></pre>
  
  <p>I have four contacts on the test device and have verified that the <code>ContactsAdapter</code> is being instantiated with the correct data. </p>
  
  <p>When I run the app, each item of the recycler take up the full screen giving the impression that only one item has been returned.</p>
  
  <p><strong>NOTE</strong>: when using any height attribute like wrap_content on my ConstraintLayout, the app becomes unresponsive and shows only a black screen. The only setting that does not crash the app is match_parent</p>
  
  <p>I've tried different layout types without any success. Any ideas as to why this is happening?</p>
  
  <p>Thanks! </p>