title: Android: constraintLayout not working inside CardView
body: <p>I am trying a layout which has following general layout hierarchy
  ConstraintLayout>CardView>ConstraintLayout>Button.</p>
  
  <p>The 2nd constraintLayout must stick to Bottom Right of cardView.</p>
  
  <p>Expected Result:
  <a href="https://i.stack.imgur.com/Mf0lA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Mf0lA.png" alt="Expected Result"></a></p>
  
  <p>But the constraints inside Card View are not working.</p>
  
  <p>I have first tried replacing 2nd ConstraintLayout with LinearLayout but it didn't helped too. The constraints are having no effect on them.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.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"
  tools:context=".home_fragment"
  android:id="@+id/home_fragment"&gt;
  &lt;android.support.v7.widget.CardView
      android:id="@+id/first_card"
      android:layout_width="200dp"
      android:layout_height="100dp"
      app:cardBackgroundColor="@color/card_color"
      app:cardCornerRadius="15dp"
      app:layout_constraintTop_toTopOf="parent"
  
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      android:layout_marginTop="200dp"
      &gt;
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintBottom_toBottomOf="parent"
          &gt;
  
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
  
              android:text="Button 1 "
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              /&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
  &lt;/android.support.v7.widget.CardView&gt;
  
  &lt;android.support.v7.widget.CardView
      android:id="@+id/second_card"
      android:layout_width="200dp"
      android:layout_height="100dp"
  
      android:layout_marginTop="56dp"
      app:cardBackgroundColor="@color/card_color"
      app:cardCornerRadius="20dp"
      app:layout_constraintStart_toStartOf="@id/first_card"
      app:layout_constraintTop_toBottomOf="@id/first_card"&gt;
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintBottom_toBottomOf="parent"
          &gt;
  
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
  
              android:text="Button 2 "
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              /&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>But here the 2nd ConstraintLayout is sticked to Top-Left of CardView.
  I want it to be sticked at Bottom-Right of CardView.
  The actual result:</p>
  
  <p><a href="https://i.stack.imgur.com/ZLIPX.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/ZLIPX.jpg" alt="enter image description here"></a></p>