android-Notification.InboxStyle
2016-07-25 22:22
543 查看
Notification.InboxStyle
public static class Notification.InboxStyle
extends Notification.Style
java.lang.Object | ||
↳ | android.app.Notification.Style | |
↳ | android.app.Notification.InboxStyle |
InboxStyleon a notification:
Notification notif = new Notification.Builder(mContext) .setContentTitle("5 New mails from " + sender.toString()) .setContentText(subject) .setSmallIcon(R.drawable.new_mail) .setLargeIcon(aBitmap) .setStyle(new Notification.InboxStyle() .addLine(str1) .addLine(str2) .setContentTitle("") .setSummaryText("+3 more")) .build();
See also:
bigContentView
Summary
|
---|
From class android.app.Notification.Style |
|
---|
Notification.InboxStyle() |
Notification.InboxStyle(Notification.Builder builder) This constructor was deprecated in API level 24. use InboxStyle(). |
| |
---|---|
Notification.InboxStyle | addLine(CharSequence cs) Append a line to the digest section of the Inbox notification. |
Notification.InboxStyle | setBigContentTitle(CharSequence title) Overrides ContentTitle in the big form of the template. |
Notification.InboxStyle | setSummaryText(CharSequence cs) Set the first line of text after the detail section in the big form of the template. |
|
---|
From class android.app.Notification.Style |
From class java.lang.Object |
Public constructors
Notification.InboxStyle
Added in API level 16Notification.InboxStyle ()
Notification.InboxStyle
Added in API level 16Notification.InboxStyle (Notification.Builder builder)
This constructor was deprecated in API level 24.
use
InboxStyle().
Parameters | |
---|---|
builder | Notification.Builder |
Public methods
addLine
Added in API level 16Notification.InboxStyle addLine (CharSequence cs)
Append a line to the digest section of the Inbox notification.
Parameters | |
---|---|
cs | CharSequence |
Returns | |
---|---|
Notification.InboxStyle |
setBigContentTitle
Added in API level 16Notification.InboxStyle setBigContentTitle (CharSequence title)
Overrides ContentTitle in the big form of the template. This defaults to the value passed to setContentTitle().
Parameters | |
---|---|
title | CharSequence |
Returns | |
---|---|
Notification.InboxStyle |
setSummaryText
Added in API level 16Notification.InboxStyle setSummaryText (CharSequence cs)
Set the first line of text after the detail section in the big form of the template.
Parameters | |
---|---|
cs | CharSequence |
Returns |
---|
Notification.InboxStyle |
相关文章推荐
- android-Notification.BigTextStyle
- 关于android程序进入第一个界面出现空白的解决方案
- android-Notification.BigPictureStyle
- Create a background service in Android
- android-Notification.Action
- Android for work总结(上)
- android Binder 学习 博客链接
- android-Notification
- Android初学之Bundle
- android-Parcelable
- 最强的Android Studio的使用技巧和快捷键
- Android性能优化
- 关于Android Studio你可能不知道的10件小事
- Genymotion——强大的Android模拟器
- Android源码编译make的各类错误解决方案汇总
- Android性能优化
- Android Volley框架的几种post提交请求方式
- android JSON数据解析
- Android第四十一天(3)
- Android中Parcelable接口用法