title: ConstraintLayout take height of another view android
body: <p>I am using <code>constraintLayout</code></p>
  
  <p>I wanted one of my view to take height of another view</p>
  
  <p>I wanted my right <code>Textview</code> to take the height of left <code>TextView</code></p>
  
  <p><strong>My code :</strong></p>
  
  <pre><code>&lt;TextView
              android:id="@+id/tv_cal_consumed"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_margin="10dp"
              android:layout_marginTop="10dp"
              android:background="@drawable/button_selector_curved"
              android:drawableLeft="@drawable/ic_add"
              android:drawablePadding="5dp"
              android:gravity="start"
              android:padding="10dp"
              android:text="@string/cal_consumed"
              android:textColor="@color/white"
              android:textSize="@dimen/text_small"
              android:textStyle="normal"
              android:typeface="normal"
              app:layout_constraintHorizontal_chainStyle="spread_inside"
              app:layout_constraintLeft_toLeftOf="parent"
              app:layout_constraintRight_toLeftOf="@+id/tv_cal_burnt"
              app:layout_constraintTop_toBottomOf="@+id/con_info" /&gt;
  
  
          &lt;TextView
              android:id="@+id/tv_cal_burnt"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_marginRight="10dp"
  
              android:background="@drawable/button_selector_curved"
              android:drawableLeft="@drawable/ic_add"
              android:drawablePadding="5dp"
              android:gravity="start"
              android:padding="10dp"
              android:text="@string/cal_burnt"
              android:textColor="@color/white"
              android:textSize="@dimen/text_small"
              android:textStyle="normal"
              android:typeface="normal"
              app:layout_constraintTop_toTopOf="@+id/tv_cal_consumed"
              app:layout_constraintLeft_toRightOf="@+id/tv_cal_consumed"
              app:layout_constraintRight_toRightOf="parent"
              app:layout_constraintBottom_toBottomOf="@+id/tv_cal_consumed" /&gt;
  </code></pre>
  
  <p><strong>Current output:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/TpmM1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TpmM1.png" alt="enter image description here"></a></p>