开发者

multiline ellipsis in textView - is this a known bug?

I want to display only 6 lines in my TextView and anything more i woul开发者_如何转开发d 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜