Note that there are some explanatory texts on larger screens.

plurals
  1. POOverlapping TextView items in RelativeLayout in 2.2; no problem in 1.6
    text
    copied!<p>I have a problem with a <code>RelativeLayout</code> containing two <code>TextView</code>s and a <code>ImageView</code>, that I use for displaying items in a <code>ListView</code>. The items are correctly displayed on Android 1.6, but on Android 2.2 the <code>TextView</code>s are overlapping.</p> <p>Here is an image that shows the correct and incorrect behavior side-by-side:</p> <p><img src="https://i.stack.imgur.com/TaAcq.png" alt="alt text"></p> <p>And here is the source code of my RelativeLayout:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:padding="6dip"&gt; &lt;ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="6dip" /&gt; &lt;TextView android:id="@+id/secondLine" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="marquee" android:singleLine="true" android:layout_below="@+id/firstLine" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" /&gt; &lt;TextView android:id="@+id/firstLine" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:ellipsize="marquee" android:singleLine="true" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Any idea what I am doing wrong?</p> <p>Thanks a lot,</p> <p>Philipp</p>
 

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