开发者

How to show ... at the end of string if it doesn't fit 1 line in TextView?

I use android:maxLines="1"开发者_运维百科 right now but I'd rather have "..." at the end of this line. Preferably fading off. Is it possible with TextView?


Not only possible, but built into the framework.

The XML flag for the TextView is android:ellipsize, and the related TextView method is setEllipsize.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜