title: ConstraintLayout center layouts
body: <p>I have the following item </p>
  
  <p><a href="https://i.stack.imgur.com/yi36T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yi36T.png" alt="enter image description here"></a></p>
  
  <p>and I want to include in another layout like this</p>
  
  <p><a href="https://i.stack.imgur.com/5qLZ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5qLZ0.png" alt="enter image description here"></a></p>
  
  <p>the problem is the two images in the bottom is not centered</p>
  
  <p>this is my code and I need to know how to be able to center them</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/layout"
          android:layout_width="75dp"
          android:layout_height="75dp"
          android:background="@drawable/xml_button_white_bg"&gt;
  
      &lt;ImageView
              android:id="@+id/checkImageView"
              android:layout_width="15dp"
              android:layout_height="15dp"
              android:layout_alignParentEnd="true"
              android:src="@drawable/ic_ckeck"
              android:tint="@color/colorPrimary"
              android:visibility="visible"
              android:layout_marginEnd="4dp"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginTop="4dp"
              app:layout_constraintTop_toTopOf="parent"/&gt;
  
      &lt;ImageView
              android:id="@+id/iconImageView"
              android:layout_width="25dp"
              android:layout_height="25dp"
              android:layout_centerHorizontal="true"
              android:src="@drawable/ic_placeholder_squre"
              app:layout_constraintBottom_toTopOf="@+id/titleTextView"
              app:layout_constraintTop_toBottomOf="@+id/checkImageView"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="8dp"
              app:layout_constraintEnd_toEndOf="parent"
              android:layout_marginEnd="8dp"/&gt;
  
      &lt;TextView
              android:id="@+id/titleTextView"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@id/iconImageView"
              android:ellipsize="end"
              android:gravity="center"
              android:lines="2"
              android:text="@string/text"
              android:textColor="@android:color/black"
              android:textSize="12sp"
              app:layout_constraintBottom_toBottomOf="parent"
              android:layout_marginBottom="4dp"
              app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="4dp"
              android:layout_marginEnd="4dp"/&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>and this is the code of the layout that contains all items</p>
  
  <pre><code>&lt;androidx.constraintlayout.widget.ConstraintLayout
              xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:layout_width="match_parent"
              android:background="@android:color/transparent"
              android:layout_height="wrap_content"&gt;
  
          &lt;include layout="@layout/item_square_bool"
                   android:id="@+id/inAppCheck"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_marginStart="8dp"
                   app:layout_constraintStart_toStartOf="parent"
                   app:layout_constraintEnd_toStartOf="@+id/voipCheck"&gt;&lt;/include&gt;
  
          &lt;include layout="@layout/item_square_bool"
                   android:id="@+id/voipCheck"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_marginStart="8dp"
                   android:layout_marginEnd="8dp"
                   app:layout_constraintEnd_toStartOf="@+id/anonymousCheck"
                   app:layout_constraintStart_toEndOf="@+id/inAppCheck"&gt;&lt;/include&gt;
  
          &lt;include layout="@layout/item_square_bool"
                   android:id="@+id/anonymousCheck"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_marginEnd="8dp"
                   app:layout_constraintEnd_toEndOf="parent"
                   app:layout_constraintStart_toEndOf="@+id/voipCheck"&gt;&lt;/include&gt;
  
          &lt;include layout="@layout/item_square_bool"
                   android:id="@+id/autoPostCheck"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="8dp"
                   android:layout_marginStart="8dp"
                   app:layout_constraintTop_toBottomOf="@+id/voipCheck"
                   app:layout_constraintStart_toStartOf="parent"&gt;&lt;/include&gt;
  
          &lt;include layout="@layout/item_square_bool"
                   android:id="@+id/doNotDisturbCheck"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_marginTop="8dp"
                   android:layout_marginEnd="8dp"
                   app:layout_constraintTop_toBottomOf="@+id/voipCheck"
                   app:layout_constraintEnd_toEndOf="parent"&gt;&lt;/include&gt;
  
  
  
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>