title: ANDROID ConstraintLayout - how to make a view stetch to the entire width and height of remainder of screen?
body: <p>hey can someone paste this code and tell me why i am not able to stretch the pink textview to fill the remainder of the empty screen. 
  Here is my code using constraintLayout primarily:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="@android:color/white"
          android:elevation="4dp"&gt;
  
          &lt;TextView
              android:id="@+id/toolbar_title"
              fontPath="fonts/Medium-Extd.otf"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/check_out"
              android:textAllCaps="true"
              android:textColor="#000000"
              android:textSize="14sp"/&gt;
  
      &lt;/android.support.v7.widget.Toolbar&gt;
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  
  &lt;android.support.v4.widget.NestedScrollView
      android:id="@+id/nsv_checkout_container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_above="@+id/footer"
      android:background="#dadbdd"
      android:fillViewport="true"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="10dp"&gt;
  
  
          &lt;android.support.v7.widget.CardView
              android:id="@+id/cvOne"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginLeft="6dp"
              android:layout_marginRight="6dp"
              android:elevation="4dp"&gt;
  
  
              &lt;ViewFlipper
                  android:id="@+id/switcher"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@color/white"
                  android:measureAllChildren="false"&gt;
  
  
                  &lt;android.support.constraint.ConstraintLayout
                      android:id="@+id/clPaymentSuccessful"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_marginBottom="25dp"
                      android:layout_marginTop="30dp"
                      &gt;
  
                      &lt;ImageView
                          android:id="@+id/iv"
                          android:layout_width="20dp"
                          android:layout_height="26dp"
                          android:src="@drawable/bag_icon_heart"
                          app:layout_constraintBottom_toTopOf="tvStatus"
                          app:layout_constraintEnd_toEndOf="parent"
                          app:layout_constraintHorizontal_bias="0.5"
                          app:layout_constraintStart_toStartOf="parent"
                          app:layout_constraintTop_toTopOf="parent"
                          /&gt;
  
                      &lt;TextView
                          android:id="@+id/tvStatus"
                          fontPath="fonts/Medium-Extd.otf"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginTop="20dp"
                          android:textAlignment="center"
                          android:textSize="18sp"
                          app:layout_constraintHorizontal_bias="0.5"
                          app:layout_constraintTop_toBottomOf="@id/iv"
                          tools:text="Payment Successful"/&gt;
  
                      &lt;TextView
                          android:id="@+id/tvAmount"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginTop="4dp"
                          android:textAlignment="center"
                          android:textSize="18sp"
                          app:layout_constraintHorizontal_bias="0.5"
                          app:layout_constraintTop_toBottomOf="@id/tvStatus"
                          tools:text="$3,800 USD"/&gt;
  
                      &lt;TextView
                          android:id="@+id/tvOrderNum"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginTop="4dp"
                          android:textAlignment="center"
  
                          android:textSize="18sp"
                          app:layout_constraintHorizontal_bias="0.5"
                          app:layout_constraintTop_toBottomOf="@id/tvAmount"
                          tools:text="your order is 7900434343"/&gt;
  
                  &lt;/android.support.constraint.ConstraintLayout&gt;
  
              &lt;/ViewFlipper&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
  
          &lt;ViewFlipper
              android:id="@+id/switcher_cta"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="10dp"
              android:background="@color/watermelon"
              android:measureAllChildren="false"
              app:layout_constraintBottom_toTopOf="@+id/btn_close_cta"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintLeft_toLeftOf="parent"
              app:layout_constraintRight_toRightOf="parent"
              app:layout_constraintTop_toBottomOf="@+id/cvOne"&gt;
  
              &lt;android.support.constraint.ConstraintLayout
                  android:id="@+id/clcta"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                  &lt;TextView
                      android:id="@+id/tvShowStaffCta"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="4dp"
                      android:textAlignment="center"
                      android:textSize="18sp"
                      app:layout_constraintHorizontal_bias="0.5"
                      app:layout_constraintTop_toTopOf="parent"
                      tools:text="Show this screen to Store Staff to complete your purchase"/&gt;
  
              &lt;/android.support.constraint.ConstraintLayout&gt;
          &lt;/ViewFlipper&gt;
  
  
          &lt;android.support.v7.widget.AppCompatButton
              android:id="@+id/btn_close_cta"
              fontPath="fonts/Medium-Extd.otf"
              android:layout_width="match_parent"
              android:layout_height="41dp"
              android:background="@color/action_blue"
              android:clickable="true"
              android:elevation="4dp"
              android:gravity="center"
              android:text="@string/close"
              android:textAlignment="center"
              android:textColor="#ffffff"
              android:textSize="14sp"
              app:layout_constraintBottom_toBottomOf="parent"/&gt;
  
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>there is a viewflipper called switcher_cta i just want that to take up the remainder grey area of the screen. how can i stetch it ?  </p>