【发布时间】:2020-04-21 19:43:08
【问题描述】:
我正在为 android 2.3.3 开发一个应用程序。我正在显示一个通知,但该通知的文本太长,并且它没有显示全文并且它被剪切了,所以我怎样才能在我的通知中显示我的全文?
代码如下:
String message = "Tonights Taraweeh consists of Alif Lam Mim and the first quarter of Sayaqul. The Surahs covered are Al-Fatiha(The Opening),and the first two-thirds of Al-Baqara(The Cow).";
Notification notification = new Notification();
notification.setLatestEventInfo(context, title, message, contentIntent);
【问题讨论】:
-
请出示一些代码。
-
您必须提供您的代码,我们才能为您提供帮助
-
是的,请显示您的相关代码部分。你是通过 Toast 展示的吗?如果是,则在 Toasts 上显示长文本不是一个好习惯,因为如果用户在任何地方触摸屏幕,Toasts 可能会被用户完成。这可能会在用户无意的情况下发生。 AlertDialog 是更好的解决方案
-
+1 @CRUSADER 指出了一个解决方案。不幸的是,这表明人们搜索他们的答案的方式很糟糕,因为这些问题已经得到了回答。
标签: android notifications