title: How can I prevent views from overlapping in relative layout?
body: <p>Right now, I have two <code>TextView</code>'s. One is aligned to the left of the <code>RelativeLayout</code> and one aligned to the right. The <code>TextView</code> on the left is much longer than the one on the right. On some occasions, the <code>TextView</code> on the left is two lines. When this happens it overlaps the <code>TextView</code> that is aligned to the right. </p>
  
  <p>Is there a way to prevent this? Or is there a way to say if the <code>TextView</code> on the left is two lines, to put the <code>TextView</code> on the right on the second line?</p>
  
  <p>I'm having trouble with name and time down here:</p>
  
  <pre><code>&lt;RelativeLayout 
      android:layout_width="wrap_content"
      android:id="@+id/relativeLayout"
      android:layout_height="wrap_content"&gt;
  
      &lt;TextView
          android:text="TextView"
          android:id="@+id/name"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10sp"
          android:textStyle="bold"
          android:textSize="16sp"/&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:id="@+id/address"
          android:text="address"
          android:layout_height="wrap_content"
          android:layout_below="@+id/name"
          android:layout_alignLeft="@+id/name"
          android:layout_marginLeft="30sp"/&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_toRightOf="@+id/address"
          android:text=""
          android:layout_height="wrap_content"
          android:layout_alignTop="@+id/address"
          android:layout_alignBottom="@+id/address"
          android:id="@+id/crossStreet"/&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:id="@+id/time"
          android:text="Time"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_marginRight="10sp"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>