title: How to center vertically the ConstraintLayout content in Android Studio?
body: <p>I'm begginer with Android Studio and I'm trying to center vertically content of <code>ConstraintLayout</code>, but without success. I've tried to use <code>android:gravity="center"</code> and I removed the <code>app:layout_editor_absoluteY</code> of all the elements, but not happens... So, how can I centralize this?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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"
      android:background="@layout/gradient"
      android:gravity="center"
      tools:context="com.test.test.MainActivity"
      tools:layout_editor_absoluteY="81dp"
      tools:layout_editor_absoluteX="0dp"&gt;
  
      &lt;EditText
          android:id="@+id/txtEmail"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="8dp"
          android:layout_marginRight="8dp"
          android:ems="10"
          android:hint="@string/lblEmail"
          android:inputType="textEmailAddress"
          android:textColorHint="@color/colorGray"
          android:background="@color/colorWhite"
          android:padding="15dp" /&gt;
  
      &lt;EditText
          android:id="@+id/txtSenha"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="8dp"
          android:layout_marginRight="8dp"
          android:layout_marginTop="8dp"
          android:ems="10"
          android:hint="@string/lblSenha"
          android:inputType="textPassword"
          android:textColorHint="@color/colorGray"
          android:background="@color/colorWhite"
          android:padding="15dp"
          app:layout_constraintTop_toBottomOf="@+id/txtEmail" /&gt;
  
      &lt;Button
          android:id="@+id/btnEntrar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="8dp"
          android:layout_marginRight="8dp"
          android:text="@string/lblEntrar"
          app:layout_constraintTop_toBottomOf="@+id/txtSenha" /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>