[英]multiline ellipsis in textView - is this a known bug?
I want to display only 6 lines in my TextView and anything more i would like to ellipsise that.我想在我的 TextView 中只显示 6 行,我想省略更多。
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.这个 TextView 是我列表行内容的一部分。 I have a custom adapter for the listView.
我有一个用于 listView 的自定义适配器。
The issue is that i do not see the ellipsis "..." at the end of the 6th line as i had expected.问题是我没有像我预期的那样在第 6 行末尾看到省略号“...”。 If i remove android:maxLines="6" and set android:singleLine="true", then i do see the "..." at the end of the first line.
如果我删除 android:maxLines="6" 并设置 android:singleLine="true",那么我确实会在第一行末尾看到“...”。 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.
我什至尝试在 java 文件中的 textView 上设置 setSelected(true)。 Still no workie.
仍然没有工作。
I am working on HoneyComb 3.1 SDK.我正在研究 HoneyComb 3.1 SDK。
It looks like this is an old bug: Issue 2254 .看起来这是一个旧错误: Issue 2254 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.