title: How can make the two buttons to be center when I use ConstraintLayout?
body: <p>I hope to make two buttons on the center of screen just like Image A when I use Code A, but in fact the two button located on the left screen just like Image B, what error code do I made in my Code A? I know that I can do it by adding a Guideline control, but why can't the Code A do it? Thanks!</p>
  
  <p><strong>Image A</strong></p>
  
  <p><a href="https://i.stack.imgur.com/Anzyr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Anzyr.png" alt="enter image description here"></a></p>
  
  <p><strong>Image B</strong></p>
  
  <p><a href="https://i.stack.imgur.com/yYqgt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yYqgt.png" alt="enter image description here"></a></p>
  
  <p><strong>Code A</strong></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"&gt;
  
      &lt;com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
          android:id="@+id/adView"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          ads:adSize="SMART_BANNER"
          ads:adUnitId="@string/ad_unit_id"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
      &lt;LinearLayout
          android:layout_width="0dp"
          android:layout_height="0dp"
          android:layout_marginLeft="7dp"
          android:layout_marginRight="7dp"
          android:layout_marginTop="10dp"
          android:layout_marginBottom="8dp"
          android:orientation="vertical"
          app:layout_constraintBottom_toTopOf="@+id/btnAddEdit"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintTop_toBottomOf="@+id/adView"&gt;
  
          &lt;TextView
              android:id="@+id/tvName"
              style="@style/myTextMedium"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Backup Name" /&gt;
  
      &lt;/LinearLayout&gt;
  
  
      &lt;Button
          android:id="@+id/btnAddEdit"
          style="@style/myTextMedium"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="2dp"
          android:layout_marginRight="7dp"
          android:layout_marginTop="2dp"
          android:text="One"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toLefttOf="@+id/btnCancel"
          app:layout_constraintBottom_toBottomOf="parent"
           /&gt;
  
      &lt;Button
          android:id="@+id/btnCancel"
          style="@style/myTextMedium"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="2dp"
          android:layout_marginLeft="7dp"
          android:layout_marginTop="2dp"
          android:text="Two"
          app:layout_constraintLeft_toRightOf="@+id/btnAddEdit"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintBottom_toBottomOf="parent"
          /&gt;
  
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>To Cheticamp:</p>
  
  <p>Thanks!</p>
  
  <p>Code AA works well, why can I delete the <code>app:layout_constraintRight_toLefttOf="@+id/btnCancel"</code> ?</p>
  
  <p><strong>Code AA</strong></p>
  
  <pre><code>&lt;Button
          android:id="@+id/btnAddEdit"
          style="@style/myTextMedium"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="2dp"
          android:layout_marginRight="7dp"
          android:layout_marginTop="2dp"
          android:text="One"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintEnd_toStartOf="@+id/btnCancel"
          app:layout_constraintHorizontal_chainStyle="packed"
          app:layout_constraintBottom_toBottomOf="parent"
          /&gt;
  </code></pre>
  
  <p>Code BB works well , why can I replace <code>app:layout_constraintEnd_toEndOf="parent"</code>  with <code>app:layout_constraintRight_toRightOf="parent"</code> </p>
  
  <p><strong>Code BB</strong></p>
  
  <pre><code>  &lt;Button
          android:id="@+id/btnCancel"
          style="@style/myTextMedium"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="2dp"
          android:layout_marginLeft="7dp"
          android:layout_marginTop="2dp"
          android:text="Two"
          app:layout_constraintStart_toEndOf="@+id/btnAddEdit"
          app:layout_constraintRight_toRightOf="parent"   
          app:layout_constraintBottom_toBottomOf="parent"
    /&gt;
  </code></pre>
  
  <p>And more, could you tell me what are different between <code>app:layout_constraintEnd_toEndOf="parent"</code> and <code>app:layout_constraintRight_toRightOf="parent"</code> </p>