title: RecyclerView itemDecoration does not work for a CardView containing a ConstraintLayout?
body: <p>I have a <code>RecyclerView</code> to which I am adding some <code>ItemDecorations</code> programatically. The view contains items that are of type <code>CardView</code> and have a <code>ConstraintLayout</code>, but the decoration does not seem to apply properly for this item layout. It works fine if I swap <code>CardView</code> and <code>ConstraintLayout</code> or if I use a <code>RelativeLayout</code> instead of a <code>CardView</code>.</p>
  
  <p>I added the item decoration like so:</p>
  
  <pre><code>RecyclerView.ItemDecoration leftPaddedDividerDecoration = 
  new DividerItemDecoration(resources.getDimensionPixelSize(R.dimen.dividerheight),
                                       ContextCompat.getDrawable(context, R.drawable.divider),
                                       resources.getDimensionPixelSize(leftPadding),
                                       0
  searchResultsRecyclerView.addItemDecoration(leftPaddedDividerDecoration);
  </code></pre>
  
  <p>The layout: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout 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"&gt;
  
      &lt;androidx.cardview.widget.CardView
          android:id="@+id/card"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:onClick="@{item::onItemClicked}"
          app:layout_constraintTop_toBottomOf="parent"&gt;
  
          &lt;androidx.constraintlayout.widget.ConstraintLayout
              android:id="@+id/constraintLayout"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
             &gt;
  
                    &lt;TextView
              android:id="@+id/title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@id/subtitle"
              android:layout_marginTop="@dimen/ad_item_spacing_1"
              android:layout_toEndOf="@id/thumbnail"
              android:layout_toStartOf="@+id/bottomSideButton"
              android:ellipsize="end"
              android:maxLines="2"
         /&gt;
  
          &lt;TextView
              android:id="@+id/subtitle"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignTop="@+id/thumbnail"
              android:layout_toEndOf="@+id/thumbnail"
              android:ellipsize="end"
              android:maxLines="1"
          /&gt;
  
          &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  
      &lt;/androidx.cardview.widget.CardView&gt;
  
  &lt;/layout&gt;
  </code></pre>
  
  <p>All I am trying to do is add a left padding to the divider under each item of this vertical <code>RecyclerView</code>. Also why is the divider get affected by what views are inside the RV?</p>