title: How to shift a textview in a new line if another textview is too long
body: <p>In a RelativeLayout  I have two TextViews aligned on the same row:
  the first is aligned to the left, the second is aligned to the right.
  How can I do to shift the second TextView in a &quot;new row&quot; only if the first texview is too long?</p>
  <p>here's a screenshot of my application:</p>
  <p><a href="https://i.stack.imgur.com/ZHibp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZHibp.jpg" alt="this is a screenshot" /></a></p>
   
  <p>in the first case, the first textview &quot;Something&quot; and the second (the time) are aligned.
  in the second case, i'd like to move the second textview under the first.</p>
  <p>Here's the code of my xml file</p>
  <pre><code>&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  android:id=&quot;@+id/relativeView&quot;
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;match_parent&quot;
  android:paddingLeft=&quot;5dip&quot;
  android:paddingRight=&quot;5dip&quot;
  android:paddingTop=&quot;5dip&quot;
  android:paddingBottom=&quot;5dip&quot; &gt;
  
  &lt;ImageView
      android:id=&quot;@+id/immagine&quot;
      android:layout_width=&quot;50dp&quot;
      android:layout_height=&quot;50dp&quot;
      android:layout_alignParentLeft=&quot;true&quot;
      android:layout_alignParentTop=&quot;true&quot;
      android:layout_marginRight=&quot;10dp&quot;
      android:src=&quot;@drawable/ic_launcher&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/nickTextView&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentTop=&quot;true&quot;
      android:layout_toRightOf=&quot;@+id/immagine&quot;
      android:text=&quot;Nickname&quot;
      android:textSize=&quot;14dp&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/messaggioTextView&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_below=&quot;@+id/nickTextView&quot;
      android:layout_toRightOf=&quot;@+id/immagine&quot;
      android:text=&quot;Messaggio&quot;
      android:textColor=&quot;#333&quot;
      android:textSize=&quot;14dp&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/oraText&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignBaseline=&quot;@+id/nickTextView&quot;
      android:layout_alignBottom=&quot;@+id/nickTextView&quot;
      android:layout_alignParentRight=&quot;true&quot;
      android:text=&quot;TextView&quot;
      android:textColor=&quot;#999&quot;
      android:textSize=&quot;12dip&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/dataText&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignBaseline=&quot;@+id/messaggioTextView&quot;
      android:layout_alignBottom=&quot;@+id/messaggioTextView&quot;
      android:layout_alignParentRight=&quot;true&quot;
      android:text=&quot;TextView&quot;
      android:textColor=&quot;#999&quot;
      android:textSize=&quot;12dip&quot; /&gt;
  </code></pre>
  
  <p>the interested textviews are messaggioTextView and oraText.</p>
  <p>Any idea?</p>