title: Android Constraint Layout Center Aligning Horizontally With Textview and Imageview Not Working
body: <p><a href="https://i.stack.imgur.com/QpZ91.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QpZ91.png" alt="I want like this"></a></p>
  
  <p>i want my textview and imageview like above mentioned image.</p>
  
  <p>1.I want to set the <strong>Textview and Imageview Horizontally</strong> in single line using constraint layout.</p>
  
  <p>2.Textview is not coming to middle(center) of the Imageview.(left and right position)</p>
  
  <p>3.Also layout gravity is not working to make <strong>textview center</strong>,due to Cosntraint layout</p>
  
  <p>4.Help me to achieve this.</p>
  
  <p>Thanks in advance. </p>
  
  <pre><code>  &lt;android.support.v7.widget.CardView
              android:id="@+id/cv2"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              app:cardCornerRadius="4dp"
              app:layout_constraintTop_toBottomOf="@+id/cv1"&gt;
  
              &lt;android.support.constraint.ConstraintLayout
                  xmlns:app="http://schemas.android.com/apk/res-auto"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                  &lt;TextView
                      android:id="@+id/title1"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:paddingLeft="10dp"
                      android:text="Hero"
                      android:textColor="@color/colorPrimary"
                      android:textSize="16dp"
                      android:textStyle="bold"
                      app:layout_constraintLeft_toLeftOf="parent"
                      app:layout_constraintRight_toLeftOf="@+id/display_pic"
                      /&gt;
  
  
                  &lt;ImageView
                      android:id="@+id/display_pic"
                      android:layout_width="80dp"
                      android:layout_height="80dp"
                      android:layout_alignParentEnd="true"
                      android:layout_margin="16dp"
                      android:adjustViewBounds="false"
                      android:scaleType="centerCrop"
                      app:layout_constraintLeft_toLeftOf="@+id/title1"
                      app:layout_constraintRight_toRightOf="parent"
                      app:layout_constraintTop_toTopOf="parent"
                      app:srcCompat="@android:color/holo_red_light" /&gt;
  
  
              &lt;/android.support.constraint.ConstraintLayout&gt;
  
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>