我的Android应用程序必须能够发送短的警报了一大群人。明显的地方是在通知中心。完整的通知显示在代码中没有问题,但在通知中心,用户只能看到前几个单词,然后看到一个省略号。通知时间不长,最多只有10-15个字。我怎样才能让文字换到新的一行?Android的通知 - 显示完整的邮件
我的代码来构建通知是在这里
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.splash)
.setContentTitle("Student Engauge")
.setContentText(extras.getString("message"))
.setAutoCancel(true)
.setTicker(extras.getString("message"));
final int notificationId = 1;
NotificationManager nm = (NotificationManager) getApplicationContext()
.getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(notificationId, mBuilder.build());
次大不前4.1支持自定义通知布局的限制更多的信息,我想的东西,更支持 – centree 2013-05-09 21:15:58
'的setStyle(新NotificationCompat.BigTextStyle()。bigText(aVeryLongString))' – likejiujitsu 2014-03-11 16:40:55
@centree使用NotificationCompat支持较旧设备上较新的通知功能。 http://developer.android.com/reference/android/support/v4/app/NotificationCompat.html – pmont 2014-04-05 07:25:16