title: textview overlapping in relativeLayout
body: <p>I m having a Custom List for a chat application.</p>
  
  <p>It has basically Two imageView in the either side and textView for the "chat message" in the middle.
  Below all the three above there is textview for time at the bottom.
  The screenshot below would better suffice.</p>
  
  <p>The problem here is the time textView is overlapping over the imageView if the text of the "chat message" is only line.</p>
  
  <p>This problem is better corrected with html-css as float clear:both.</p>
  
  <p>I went through another answer for this with a nested RelativeLayout within LinearLayout <a href="https://stackoverflow.com/questions/3355808/android-relative-layout-below-2-items">here</a> but i want to keep it clean with a single RelativeLayout.</p>
  
  <p>The layout xml is as below -</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="horizontal" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;ImageView
      android:id="@+id/icon1"
      android:layout_width="40dp"
      android:layout_height="40dp"
      android:src="@mipmap/ic_launcher" /&gt;
  
  &lt;TextView
      android:id="@+id/msgText"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="bottom"
      android:textSize="20sp"
      android:layout_marginLeft="42dp"
      android:layout_marginRight="42dp"
      android:text="this is a test" /&gt;
  
  &lt;ImageView
      android:id="@+id/icon2"
      android:layout_width="40dp"
      android:layout_height="40dp"
      android:layout_alignParentRight="true"
      android:src="@mipmap/ic_launcher" /&gt;
  
  &lt;TextView
      android:id="@+id/timeText"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:textSize="40px"
      android:layout_marginTop="10dp"
      android:layout_below="@+id/msgText"
      android:layout_alignParentRight="true"
      android:gravity="right"
      /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The screenshot for this as below - </p>
  
  <p><a href="https://i.stack.imgur.com/lAWim.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lAWim.png" alt="enter image description here"></a></p>