Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In XML, use the property <code>android:ellipsize="marquee"</code>for the TextView.</p> <p>Your TextView can be defined like:</p> <pre><code>&lt;TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="2" android:lines="2" android:ellipsize="marquee"/&gt; </code></pre> <p><strong>Edit</strong>: I've tried the following code, adapted from yours:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rlt_news" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/cell_background" android:padding="5dip" &gt; &lt;TextView android:id="@+id/tv_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:paddingLeft="5dip" android:text="Name" android:textStyle="bold" /&gt; &lt;ImageView android:id="@+id/rss_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/tv_title" android:layout_marginLeft="2dip" android:adjustViewBounds="true" android:maxHeight="100dip" android:maxWidth="100dip" android:src="@drawable/rss_cell_icon" android:visibility="visible" /&gt; &lt;TextView android:id="@+id/tv_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_marginLeft="2dp" android:layout_marginTop="4dp" android:layout_toRightOf="@id/rss_icon" android:ellipsize="marquee" android:gravity="top" android:lines="2" android:maxLines="2" android:paddingBottom="5dp" android:paddingRight="7dp" android:text="Description of the news, just the short paragraph, \nSignature, to see how it works if there are more than two lines" android:textColor="@android:color/black" android:textSize="12sp" android:typeface="sans" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>And here is the output:<br> <img src="https://i.stack.imgur.com/6onMT.png" alt="enter image description here"></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