title: Android ConstraintLayout - Put one view on top of another view
body: <p>I'm trying to add a <code>ProgressBar</code> on top of a <code>Button</code> (both are inside a <code>ConstraintLayout</code>).</p>
  
  <pre><code>&lt;Button
      android:id="@+id/sign_in_button"
      android:layout_width="280dp"
      android:layout_height="75dp"
      android:layout_marginBottom="75dp"
      android:layout_marginTop="50dp"
      android:text="@string/sign_in"
      android:textColor="@color/white"
      android:textSize="22sp"
      android:textStyle="bold"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintLeft_toLeftOf="parent"
      app:layout_constraintRight_toRightOf="parent"
      app:layout_constraintTop_toBottomOf="@+id/passwordEditText"
      app:layout_constraintVertical_bias="0.0"/&gt;
  
  &lt;ProgressBar
      android:id="@+id/progressBar"
      style="?android:attr/progressBarStyle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:layout_constraintTop_toTopOf="@+id/sign_in_button"
      android:layout_marginTop="8dp"
      app:layout_constraintBottom_toBottomOf="@+id/sign_in_button"
      android:layout_marginBottom="8dp"
      app:layout_constraintVertical_bias="0.5"
      android:layout_marginLeft="8dp"
      app:layout_constraintLeft_toLeftOf="@+id/sign_in_button"
      android:layout_marginRight="8dp"
      app:layout_constraintRight_toRightOf="@+id/sign_in_button"/&gt;
  </code></pre>
  
  <p>But even after calling <code>bringToFront</code> on the <code>ProgressBar</code> in <code>onCreate</code>, it always stays behind the <code>Button</code>.</p>
  
  <pre><code>ProgressBar progressBar = (ProgressBar)findViewById(R.id.progressBar);
  progressBar.bringToFront();
  </code></pre>