我想在通知的长文本中包含换行符。\n 不起作用。
notification.setLatestEventInfo(context, title, message+"\r\n"+"test",intent);
android2.2通知中的换行符代码是什么?
谢谢
最佳答案
我认为您可能必须创建一个带有两个 TextView 的自定义通知布局,每个 TextView 对应一行。
这是通知的官方教程,但我不确定其中有多少适用于 2.2。 http://developer.android.com/guide/topics/ui/notifiers/notifications.html
以下链接可能也有用: Custom notification layouts and text colors
关于android - 如何在android 2.2通知中添加换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13862281/