Notification multiline

后端 未结 5 813
时光取名叫无心
时光取名叫无心 2020-12-28 12:53

How to make a long notification multiline. I am using the below code snippet but its not working:

NotificationCompat.Builder mBuilder = new NotificationCompa         


        
5条回答
  •  情书的邮戳
    2020-12-28 13:28

    Notification notification = new Notification.Builder(context)
             .setContentTitle(title)  
             .setSmallIcon(icon) 
             .setStyle(new Notification.BigTextStyle().bigText(notificationMessage))
             .setAutoCancel(true)
             .setContentIntent(intent)
             .build();
    

提交回复
热议问题