title: android constraint layout alignment between textview and edittext
body: <p>I need to put a <code>TextView</code> and <code>EditText</code> in the same line within constraint layout and keep it align each other! below code generate a picture like below:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/serverIpAddr&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:text=&quot;192.168.1.11&quot;
          android:textAppearance=&quot;@style/TextAppearance.AppCompat.Body1&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  
      &lt;EditText
          android:id=&quot;@+id/serverPort&quot;
          style=&quot;@style/Widget.AppCompat.EditText&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginStart=&quot;0dp&quot;
          android:layout_marginLeft=&quot;0dp&quot;
          android:layout_marginTop=&quot;0dp&quot;
          android:ems=&quot;10&quot;
          android:inputType=&quot;number&quot;
          android:text=&quot;8080&quot;
          android:textAppearance=&quot;@style/TextAppearance.AppCompat.Body1&quot;
          app:layout_constraintStart_toEndOf=&quot;@+id/serverIpAddr&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p>Now it looks ugly, the TextView and EditText log align horizontally correctly, TextView a little bit above EditText</p>
  <p><a href="https://i.stack.imgur.com/a479B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a479B.png" alt="enter image description here" /></a></p>