title: Android add other layout in ConstraintLayout using include tag
body: <p>I'm making a simple test app using ConstraintLayout, but I have a problem.</p>
  <p>Here is my code:</p>
  <p><strong>activity_main.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;layout 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;&gt;
  
  &lt;android.support.constraint.ConstraintLayout
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;com.example.user.myapplication.activity.MainActivity&quot;&gt;
  
      &lt;Button
          android:id=&quot;@+id/btn_launch&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginEnd=&quot;8dp&quot;
          android:layout_marginTop=&quot;16dp&quot;
          android:text=&quot;launch&quot;
          app:layout_constraintHorizontal_bias=&quot;1.0&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/text_view&quot;
          android:layout_width=&quot;100dp&quot;
          android:layout_height=&quot;50dp&quot;
          android:layout_marginEnd=&quot;16dp&quot;
          android:layout_marginTop=&quot;16dp&quot;
          android:text=&quot;Hello World!&quot;
          app:layout_constraintHorizontal_bias=&quot;1&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/btn_launch&quot; /&gt;
  
      &lt;include
          layout=&quot;@layout/content_main&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/text_view&quot; /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p><strong>content_main.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;layout 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;&gt;
  
  &lt;android.support.constraint.ConstraintLayout
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:orientation=&quot;vertical&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView2&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginTop=&quot;8dp&quot;
          android:text=&quot;123456&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView3&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginLeft=&quot;8dp&quot;
          android:layout_marginRight=&quot;8dp&quot;
          android:layout_marginTop=&quot;8dp&quot;
          android:text=&quot;98765&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/textView2&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginLeft=&quot;8dp&quot;
          android:layout_marginRight=&quot;8dp&quot;
          android:layout_marginTop=&quot;8dp&quot;
          android:text=&quot;abc&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/textView3&quot; /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p><strong>Code result</strong></p>
  <p><a href="https://i.stack.imgur.com/aFdND.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFdND.png" alt="Problem" /></a></p>
  
  <p>I want &quot;<strong>content_main</strong>&quot; to be under the &quot;Hello world!&quot; TextView.</p>
  <p>I using RelativeLayout, LinearLayout, ConstraintLayout at &quot;<strong>content_main</strong>&quot; element, but they do not not work.</p>
  <p>I don't find any solution.</p>
  <p>Does the Android &quot;include&quot; tag not work with ConstraintLayout?</p>