2

我想在通知的长文本中包含换行符。\n 不起作用。

notification.setLatestEventInfo(context, title, message+"\r\n"+"test",intent);

android2.2 通知中换行符的代码是什么?

谢谢

4

1 回答 1

2

我认为您可能必须创建一个带有两个文本视图的自定义通知布局,每个视图用于一行。

这是通知的官方教程,但我不确定其中有多少适用于 2.2。 http://developer.android.com/guide/topics/ui/notifiers/notifications.html

以下链接也可能有用: 自定义通知布局和文本颜色

于 2012-12-13T15:08:10.593 回答