title: EditText in RelativeLayout issue in Android
body: <p>I currently have a layout defined as follows:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;EditText
          android:id="@+id/valueEditText"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_alignParentRight="true"
          android:layout_gravity="center_vertical"
          android:layout_marginRight="20dp"
          android:text="EditText"
          android:textSize="18sp"
          android:gravity="right"
          /&gt;
      &lt;TextView
          android:id="@+id/labelTextView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_marginLeft="20dp"
          android:layout_alignParentLeft="true"
          android:layout_toLeftOf="@id/valueEditText"
          android:text="Label"
          android:textStyle="bold"
          android:textSize="18sp"
          android:gravity="left"
          android:maxLines="1"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The layout is used for rendering of a few ListView items.
  This layout is rendered correctly at first. The EditText is aligned to the right and expands to the left when typing:</p>
  
  <p><img src="https://i.stack.imgur.com/6fvHd.png" alt="Screenshot 1"></p>
  
  <p>However, when typing in the EditText, the expanding text field will eventually overlap the Label textview:</p>
  
  <p><img src="https://i.stack.imgur.com/oDiS1.png" alt="enter image description here"></p>
  
  <p>Is there any way to make the EditText wrap and go multiline so that the Label textview doesn't get overlapped? 
  I know I could use android:maxWidth="XXdp" attribute on the EditText but considering that the contents of the Label textview (and therefore it's size) may change dynamically I don't think that's the best way to do it.</p>