2

I want to display only 6 lines in my TextView and anything more i would like to ellipsise that.

So, i did

<TextView android:id="@+id/text" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_alignParentLeft="true"
    android:layout_centerVertical="true" android:paddingLeft="20dip"
    android:paddingRight="40dip" android:textSize="18dip"
    android:paddingBottom="5dip" android:paddingTop="5dip"
    android:maxLines="6" 
    android:ellipsize="marquee" 
    android:singleLine="false"
    />

This TextView is part of my list row contents. I have a custom adapter for the listView.

The issue is that i do not see the ellipsis "..." at the end of the 6th line as i had expected. If i remove android:maxLines="6" and set android:singleLine="true", then i do see the "..." at the end of the first line. So, why does not the marquee work if the number of line is more than one?

Is this a known bug? If yes, any workaround? I even tried setting the setSelected(true) on the textView in the java file. Still no workie.

I am working on HoneyComb 3.1 SDK.

inazaruk
  • 74,247
  • 24
  • 188
  • 156
VJ Vélan Solutions
  • 6,434
  • 5
  • 49
  • 63
  • I've created a workaround for this problem, which you can find at http://stackoverflow.com/questions/2160619/android-ellipsize-multiline-textview/6763689#6763689 – Micah Hainline Jul 20 '11 at 14:50

1 Answers1

1

It looks like this is an old bug: Issue 2254.

inazaruk
  • 74,247
  • 24
  • 188
  • 156