title: How to chain the groups in Constraint Layout?
body: <p><a href="https://i.stack.imgur.com/wH5oq.png" rel="noreferrer">This is the layout I am going to do using Constraint Layout.</a></p>
  
  <p>I want to create the above layout without any Nesting of Views, which is one of the advantages of using Constraint Layout.</p>
  
  <p>It is a simple layout. But i wish to add vertical chaining to the layout.</p>
  
  <p>If i add vertical chaining, each and every view will be spread. But my condition is that the Text View and the View(Horizontal line) should be together, as a group.</p>
  
  <p>And i need to chain that group. I tried the following way:</p>
  
  <pre><code>&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=".activities.Settings"&gt;
  
      &lt;include
          android:id="@+id/toolbarLayout"
          layout="@layout/app_bar_main"
          android:layout_width="match_parent"
          android:layout_height="56dp"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
      &lt;TextView
          android:id="@+id/cancelPolicy"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:padding="@dimen/padding_small"
          android:text="@string/canc_pol"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/toolbarLayout" /&gt;
  
      &lt;View
          android:id="@+id/cancelPolicyLine"
          android:layout_width="0dp"
          android:layout_height="2dp"
          android:background="#c0c0c0"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/cancelPolicy" /&gt;
  
      &lt;android.support.constraint.Group
          app:layout_constraintVertical_chainStyle="spread"
          app:layout_constraintTop_toTopOf="@id/toolbarLayout"
          app:layout_constraintBottom_toTopOf="@id/termsAndCondGroup"
          android:id="@+id/cancelPolicyGroup"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:constraint_referenced_ids="cancelPolicy,cancelPolicyLine" /&gt;
  
  
      &lt;TextView
          android:id="@+id/termsAndCond"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:padding="@dimen/padding_small"
          android:text="@string/t_and_c"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/cancelPolicyLine" /&gt;
  
      &lt;View
          android:id="@+id/termsAndCondLine"
          android:layout_width="0dp"
          android:layout_height="2dp"
          android:background="#c0c0c0"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/termsAndCond" /&gt;
  
      &lt;android.support.constraint.Group
          app:constraint_referenced_ids="termsAndCond,termsAndCondLine"
          app:layout_constraintTop_toBottomOf="@id/cancelPolicyGroup"
          app:layout_constraintBottom_toTopOf="@id/privatePolicyGroup"
          android:id="@+id/termsAndCondGroup"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
      &lt;TextView
          android:id="@+id/privatePolicy"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:padding="@dimen/padding_small"
          android:text="@string/priv_pol"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/termsAndCondLine" /&gt;
  
      &lt;View
          android:id="@+id/privatePolicyLine"
          android:layout_width="0dp"
          android:layout_height="2dp"
          android:background="#c0c0c0"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/privatePolicy" /&gt;
  
      &lt;android.support.constraint.Group
          android:id="@+id/privatePolicyGroup"
          app:layout_constraintTop_toBottomOf="@id/termsAndCondGroup"
          app:layout_constraintBottom_toTopOf="@id/aboutGroup"
          app:constraint_referenced_ids="privatePolicy,privatePolicyLine"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
      &lt;TextView
          android:id="@+id/about"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:padding="@dimen/padding_small"
          android:text="@string/about"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/privatePolicyLine" /&gt;
  
      &lt;View
          android:id="@+id/aboutLine"
          android:layout_width="0dp"
          android:layout_height="2dp"
          android:background="#c0c0c0"
          app:layout_constraintEnd_toEndOf="@id/guidelineRight"
          app:layout_constraintStart_toStartOf="@id/guidelineLeft"
          app:layout_constraintTop_toBottomOf="@id/about" /&gt;
  
      &lt;android.support.constraint.Group
          android:id="@+id/aboutGroup"
          app:layout_constraintTop_toBottomOf="@id/privatePolicyGroup"
          app:layout_constraintBottom_toBottomOf="@id/guidelineBottom"
          app:constraint_referenced_ids="about,aboutLine"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
  
      &lt;android.support.constraint.Guideline
          android:id="@+id/guidelineTop"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          app:layout_constraintGuide_percent="0" /&gt;
  
      &lt;android.support.constraint.Guideline
          android:id="@+id/guidelineBottom"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          app:layout_constraintGuide_percent="0.5" /&gt;
  
      &lt;android.support.constraint.Guideline
          android:id="@+id/guidelineLeft"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          app:layout_constraintGuide_percent="0.1" /&gt;
  
      &lt;android.support.constraint.Guideline
          android:id="@+id/guidelineRight"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          app:layout_constraintGuide_percent="0.9" /&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>But only the groups were chained, the views still remained the same.
  <a href="https://i.stack.imgur.com/w16PX.png" rel="noreferrer">This is What i got.</a>
   I would like to know weather we can chain groups of views without nesting of layouts.</p>