Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this</p> <pre><code>&lt;RelativeLayout android:id="@+id/wrapper" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="left"&gt; &lt;TextView android:id="@+id/timeIn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="15dip" android:layout_alignParentRight="true" android:text="23:23"/&gt; &lt;TextView android:id="@+id/messageIn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_margin="5dip" android:background="@drawable/bubble_yellow" android:layout_toLeftOf="@+id/timeIn" android:layout_alignParentLeft="true" android:paddingLeft="10dip" android:text="HIHIHIHIHIHI" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>To work for small texts also (To resize the width of messageIn according to message) and time to appear right of message (not right aligned)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/wrapper" android:layout_width="wrap_content" android:layout_height="wrap_content" android:weightSum="1.0" &gt; &lt;LinearLayout android:id="@+id/lin_lay1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" &gt; &lt;TextView android:id="@+id/messageIn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_margin="5dip" android:background="@drawable/bubble_yellow" android:paddingLeft="10dip" android:text="HIHIHI" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/lin_lay2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.1" &gt; &lt;TextView android:id="@+id/timeIn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="15dip" android:padding="5dp" android:text="23:23" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload