如何限制Android ListView中文本的长度? [英] How to limit a length of a text in android ListView?
本文介绍了如何限制Android ListView中文本的长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以知道如何限制listView
中文本的长度吗?
May I know how to limit the length of a text in listView
?
下面是wechat
这是我的listView
如何限制文本的长度,以使其显示为 工作说明.请...
How to limit the length of text so it will display like this is the work description.Ple...
任何帮助将不胜感激.
推荐答案
如果将TextView
都设置为将其尺寸缩小到结束位置,那么您应该会得到所需的结果.
If you set the TextView
to both singleLine and ellipsize to end, then you should have the desired result.
例如:
<TextView
...
android:singleLine="true"
android:ellipsize="end"
/>
这篇关于如何限制Android ListView中文本的长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文