Ellipsize不工作 [英] Ellipsize is not working

查看:153
本文介绍了Ellipsize不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我设置使用的setText()的文字一个TextView。在性能,我已经设置:

I have a TextView which i set the text using setText(). In properties, I have set:

Ellipsize = END
Lines = 1
Gravity = Left
Scroll Horizontal = False

但这个片段额外的文本(因为在这里最后一个空格发现剪辑文本)。但不包括点(...)结尾。

But this clips extra text (clips text since where last space is found). But do not include dots ("...") at the end.

例如:

-------------------------------
|                             |
 Hi how are you ? And where are you now ?
|                             |
|                             |

裁剪后:

-------------------------------
|                             |
 Hi how are you ? And where 
|                             |
|                             |

我想:

-------------------------------
|                             |
 Hi how are you ? And where...
|                             |
|                             |

我使用的是Android 1.6。 plz帮助。

I am using Android 1.6. Plz help.

推荐答案

安卓SINGLELINE =真正的 textView.setEllipsize(TruncateAt。 END);

这些都是实现这一目标的两个关键因素。

These are the two key elements to achieve that.

这篇关于Ellipsize不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆