title: ConstraintLayout drawing order/layer order
body: <p>Simple question:</p>
  
  <p>What is the exact algorithm used by ConstraintLayout in order to know which View is drawn first and which View is drawn last?</p>
  
  <p>In RelativeLayout, the last View in the XML file is drawn last, hence it will be on top of everything, obscuring the Views which where drawn earlier.</p>
  
  <p>Why does not ConstraintLayout carry the same function (at least, apparently)?</p>
  
  <p>The following code results in the Button being displayed on top of the included View.</p>
  
  <pre><code>&lt;Button
      android:id="@+id/calculate"
      android:layout_width="183dp"
      android:layout_height="76dp"
      android:layout_marginBottom="5dp"
      android:layout_marginLeft="16dp"
      android:layout_marginStart="16dp"
      android:text="C A L C U L A T E"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toLeftOf="parent" /&gt;
  
  &lt;include
      android:id="@+id/help_window"
      layout="@layout/help_window"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_marginBottom="0dp"
      android:layout_marginLeft="0dp"
      android:layout_marginRight="0dp"
      android:layout_marginTop="0dp"
      android:visibility="invisible"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/include4" /&gt;
  
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>