【发布时间】:2015-10-26 08:40:04
【问题描述】:
我的状态栏通知消息太长,所以我想多行显示它,但我不知道为什么它不这样显示。
这是我的代码:
String msg = "text1 text2 text3 text4 text5";
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context);
mBuilder.setContentTitle(context.getResources().getString(R.string.time_to_brush_title));
mBuilder.setContentText(msg);
mBuilder.setTicker(context.getResources().getString(R.string.time_to_brush_title));
mBuilder.setSmallIcon(R.drawable.ic_launcher);
mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(msg));
但是,这是通知栏包含的内容:
text1 text2 text3 ...
【问题讨论】:
标签: android notifications statusbar