如何在 Notification 中选取文本内容? [英] How can I marquee the text content in Notification?

查看:11
本文介绍了如何在 Notification 中选取文本内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文本内容太长,无法在通知中显示,因此被剪切.我能做什么?请帮忙.

The text content is just too long to be displayed in the notification and it is cut. What can I do? Please help.

推荐答案

试试这个:

它对我有用,我已经测试过了.

it Works for me, I have tested it.

首先创建自定义通知:

如下所示:开发者网站的此链接.

然后在你想要选取框的消息的 TextView 中,放置这一行:

After that in TextView of message you want to marquee, put this line:

 android:ellipsize="marquee"

它可以随心所欲地工作.享受.希望它会帮助你.谢谢.

And It Works as you want. Enjoy. Hope it will help you. Thanks.

这篇关于如何在 Notification 中选取文本内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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