我正在尝试使用 .setContentText() 中的换行符发出通知,但这不起作用。
我的通知的生成器
builder.setContentTitle("Notification")
.setSmallIcon(R.drawable.notif)
.setContentText("Example1 "+"\n"+" Example2")
.setDefaults(Notification.DEFAULT_ALL)
.setAutoCancel(true)
.setContentIntent(contentIntent)
.setTicker("testing it")
.setVibrate(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400})
.setPriority(Notification.PRIORITY_HIGH);
Run Code Online (Sandbox Code Playgroud)
在通知中: Example1 Example2
但是我需要
Example1
Example2
Run Code Online (Sandbox Code Playgroud)