Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange issue with android:ellipsize="end"
    primarykey
    data
    text
    <p>I am using <strong>android:ellipsize="end"</strong> in android xml file, &amp; surprisingly I am not getting the layout that I want, the 3 dots(...) are showing but after that dots there is another word truncated. Also this is a "not-always" behavior, check the ListView attached, sometimes, the behavior is normal &amp; sometimes not.</p> <p>Here's the screenshot of the layout from my device,</p> <p><img src="https://i.stack.imgur.com/czOPA.png" alt="enter image description here"></p> <p>I don't have any idea why this is happening. Here's my xml file, having problem with the <strong>tv_news_content</strong> TextView -</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="100dp" android:background="@color/white" &gt; &lt;ImageView android:id="@+id/iv_next_tier" android:layout_width="18dp" android:layout_height="21dp" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="10dp" android:src="@drawable/right_arrow" &gt; &lt;/ImageView&gt; &lt;TextView android:id="@+id/tv_news_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="7dp" android:layout_marginRight="5dp" android:layout_marginTop="3dp" android:layout_toLeftOf="@+id/iv_next_tier" android:ellipsize="end" android:maxLines="2" android:text="News Title" android:textColor="@color/black" android:textSize="17dp" android:textStyle="bold" /&gt; &lt;TextView android:id="@+id/tv_news_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/tv_news_title" android:layout_below="@+id/tv_news_title" android:layout_marginRight="5dp" android:layout_toLeftOf="@+id/iv_next_tier" android:ellipsize="end" android:maxLines="2" android:text="News Contents" android:textColor="@color/black_light" android:textSize="15dp" /&gt; &lt;View android:id="@+id/view" android:layout_width="wrap_content" android:layout_height="0dp" android:layout_below="@+id/tv_news_content" android:layout_marginTop="5dp" /&gt; </code></pre> <p></p> <p>To make things clear, <strong>tv_news_title</strong> is the topmost bold TextView, &amp; <strong>iv_next_tier</strong> is the small arrow-type ImageView at the right. &amp; <strong>tv_news_content</strong> is the TextView that I am facing problem with.</p> <p>Any solution why I am not getting desired output? Desired output means the always normal behaviour - I want those 3 dots at the end of second line of <strong>tv_news_content</strong> TextView, not before a truncated word.</p> <p>Any suggestion is appreciated.</p>
    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.
 

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