Kei*_*ozi 7 notifications android
有没有人知道我们如何在通知中和时间戳(何时)之前添加文本,在应用程序名称的右侧? 
在Notification.Builder中有一个名为setSubText()的方法.
您可以传递消息以显示为String.
链接到文档:https://developer.android.com/reference/android/app/Notification.Builder.html#setSubText(java.lang.CharSequence)
Notification noti = new Notification.Builder(mContext)
.setContentTitle(AppName)
.setContentText(message)
.setSmallIcon(R.drawable.logo)
.setSubText(senders_mail)
.build();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1023 次 |
| 最近记录: |