title: ConstraintLayout equal height and width of textviews with drawable image and different texts
body: <p>I want to replicate the below LinearLayout parent and child views to ConstraintLayout</p>
  <pre><code>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:id=&quot;@+id/constraintLayout&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:orientation=&quot;vertical&quot;
      tools:context=&quot;com.xyz.constraintlayout.MainActivity$PlaceholderFragment&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/section_label&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginBottom=&quot;@dimen/activity_vertical_margin&quot;
          android:layout_marginEnd=&quot;@dimen/activity_horizontal_margin&quot;
          android:layout_marginStart=&quot;@dimen/activity_horizontal_margin&quot;
          android:layout_marginTop=&quot;@dimen/activity_vertical_margin&quot;
          android:gravity=&quot;center&quot;
          android:text=&quot;Section Number&quot; /&gt;
  
      &lt;LinearLayout
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;&gt;
  
          &lt;TextView
              android:id=&quot;@+id/first_text&quot;
              android:layout_width=&quot;0dp&quot;
              android:layout_height=&quot;match_parent&quot;
              android:layout_gravity=&quot;center&quot;
              android:layout_margin=&quot;4dp&quot;
              android:layout_weight=&quot;1&quot;
              android:background=&quot;@drawable/border&quot;
              android:drawablePadding=&quot;10dp&quot;
              android:drawableTop=&quot;@drawable/ic_not_interested_black_48dp&quot;
              android:fontFamily=&quot;sans-serif-smallcaps&quot;
              android:gravity=&quot;center&quot;
              android:padding=&quot;6dp&quot;
              android:text=&quot;Book of first_text Language&quot;
              android:textColor=&quot;@color/colorPrimaryDark&quot;
              android:textStyle=&quot;bold&quot; /&gt;
  
          &lt;TextView
              android:id=&quot;@+id/second_text&quot;
              android:layout_width=&quot;0dp&quot;
              android:layout_height=&quot;match_parent&quot;
              android:layout_gravity=&quot;center&quot;
              android:layout_margin=&quot;4dp&quot;
              android:layout_weight=&quot;1&quot;
              android:background=&quot;@drawable/border&quot;
              android:drawablePadding=&quot;10dp&quot;
              android:drawableTop=&quot;@drawable/ic_not_interested_black_48dp&quot;
              android:fontFamily=&quot;sans-serif-smallcaps&quot;
              android:gravity=&quot;center&quot;
              android:padding=&quot;6dp&quot;
              android:text=&quot;Book of second_text&quot;
              android:textColor=&quot;@color/colorPrimaryDark&quot;
              android:textStyle=&quot;bold&quot; /&gt;
  
          &lt;TextView
              android:id=&quot;@+id/third_text&quot;
              android:layout_width=&quot;0dp&quot;
              android:layout_height=&quot;match_parent&quot;
              android:layout_gravity=&quot;center&quot;
              android:layout_margin=&quot;4dp&quot;
              android:layout_weight=&quot;1&quot;
              android:background=&quot;@drawable/border&quot;
              android:drawablePadding=&quot;10dp&quot;
              android:drawableTop=&quot;@drawable/ic_not_interested_black_48dp&quot;
              android:fontFamily=&quot;sans-serif-smallcaps&quot;
              android:gravity=&quot;center&quot;
              android:padding=&quot;6dp&quot;
              android:text=&quot;Book of third_text Topics and Miscellaneous&quot;
              android:textColor=&quot;@color/colorPrimaryDark&quot;
              android:textStyle=&quot;bold&quot; /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  <p>and the output is:</p>
  <p><a href="https://i.stack.imgur.com/UhBM3.png" rel="nofollow noreferrer">LinearLayout</a></p>
  <p>I tried to replicate to ConstraintLayout with spread chains as below</p>
  <pre><code>&lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:id=&quot;@+id/constraintLayout&quot;
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;match_parent&quot;
  tools:context=&quot;com.sed.constraintlayout.MainActivity$PlaceholderFragment&quot;&gt;
  
  &lt;TextView
      android:id=&quot;@+id/section_label&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_marginStart=&quot;@dimen/activity_horizontal_margin&quot;
      android:layout_marginTop=&quot;@dimen/activity_vertical_margin&quot;
      android:layout_marginEnd=&quot;@dimen/activity_horizontal_margin&quot;
      android:layout_marginBottom=&quot;@dimen/activity_vertical_margin&quot;
      android:gravity=&quot;center&quot;
      android:text=&quot;Section Number&quot;
      app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
      app:layout_constraintTop_toTopOf=&quot;@+id/constraintLayout&quot;
      tools:layout_constraintLeft_creator=&quot;1&quot;
      tools:layout_constraintTop_creator=&quot;1&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/first_text&quot;
      android:layout_width=&quot;0dp&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_gravity=&quot;center&quot;
      android:layout_margin=&quot;4dp&quot;
      android:background=&quot;@drawable/border&quot;
      android:drawableTop=&quot;@drawable/ic_not_interested_black_48dp&quot;
      android:drawablePadding=&quot;10dp&quot;
      android:fontFamily=&quot;sans-serif-smallcaps&quot;
      android:gravity=&quot;center&quot;
      android:padding=&quot;6dp&quot;
      android:text=&quot;Book of first_text Language&quot;
      android:textColor=&quot;@color/colorPrimaryDark&quot;
      android:textStyle=&quot;bold&quot;
      app:layout_constraintBottom_toBottomOf=&quot;@+id/barrier&quot;
      app:layout_constraintEnd_toStartOf=&quot;@+id/second_text&quot;
      app:layout_constraintHorizontal_bias=&quot;0.5&quot;
      app:layout_constraintHorizontal_chainStyle=&quot;spread&quot;
      app:layout_constraintHorizontal_weight=&quot;1&quot;
      app:layout_constraintStart_toStartOf=&quot;parent&quot;
      app:layout_constraintTop_toBottomOf=&quot;@id/section_label&quot;
      app:layout_constraintVertical_bias=&quot;0.0&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/second_text&quot;
      android:layout_width=&quot;0dp&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_gravity=&quot;center&quot;
      android:layout_margin=&quot;4dp&quot;
      android:background=&quot;@drawable/border&quot;
      android:drawableTop=&quot;@drawable/ic_not_interested_black_48dp&quot;
      android:drawablePadding=&quot;10dp&quot;
      android:fontFamily=&quot;sans-serif-smallcaps&quot;
      android:gravity=&quot;center&quot;
      android:padding=&quot;6dp&quot;
      android:text=&quot;Book of second_text&quot;
      android:textColor=&quot;@color/colorPrimaryDark&quot;
      android:textStyle=&quot;bold&quot;
      app:layout_constraintBottom_toBottomOf=&quot;@+id/barrier&quot;
      app:layout_constraintEnd_toStartOf=&quot;@+id/third_text&quot;
      app:layout_constraintHorizontal_bias=&quot;0.5&quot;
      app:layout_constraintHorizontal_weight=&quot;1&quot;
      app:layout_constraintStart_toEndOf=&quot;@+id/first_text&quot;
      app:layout_constraintTop_toBottomOf=&quot;@id/section_label&quot;
      app:layout_constraintVertical_bias=&quot;0.0&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/third_text&quot;
      android:layout_width=&quot;0dp&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_gravity=&quot;center&quot;
      android:layout_margin=&quot;4dp&quot;
      android:background=&quot;@drawable/border&quot;
      android:drawableTop=&quot;@drawable/ic_not_interested_black_48dp&quot;
      android:drawablePadding=&quot;10dp&quot;
      android:fontFamily=&quot;sans-serif-smallcaps&quot;
      android:gravity=&quot;center&quot;
      android:padding=&quot;6dp&quot;
      android:text=&quot;Book of third_text Topics and Miscellaneous&quot;
      android:textColor=&quot;@color/colorPrimaryDark&quot;
      android:textStyle=&quot;bold&quot;
      app:layout_constraintBottom_toBottomOf=&quot;@+id/barrier&quot;
      app:layout_constraintEnd_toEndOf=&quot;parent&quot;
      app:layout_constraintHorizontal_bias=&quot;0.5&quot;
      app:layout_constraintHorizontal_weight=&quot;1&quot;
      app:layout_constraintStart_toEndOf=&quot;@+id/second_text&quot;
      app:layout_constraintTop_toBottomOf=&quot;@id/section_label&quot;
      app:layout_constraintVertical_bias=&quot;0.0&quot; /&gt;
  
  &lt;android.support.constraint.Barrier
      android:id=&quot;@+id/barrier&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      app:barrierDirection=&quot;bottom&quot;
      app:constraint_referenced_ids=&quot;first_text, second_text, third_text&quot; /&gt;
  </code></pre>
  <p>&lt;/android.support.constraint.ConstraintLayout&gt;
  The output is:</p>
  <p><a href="https://i.stack.imgur.com/J5Pwj.png" rel="nofollow noreferrer">ConstraintLayout</a></p>
  <p>As it is evident that the height of the views in the constraint layout is not even.
  How to make it even?
  Thanks for any help.</p>
  <p>EDIT:</p>
  <p>I added barrier to the layout as suggested by @StarterPack but still the same output.</p>