android-Notification.BigTextStyle
2016-07-25 22:18
447 查看
Notification.BigTextStyle
public static class Notification.BigTextStyle
extends Notification.Style
java.lang.Object | ||
↳ | android.app.Notification.Style | |
↳ | android.app.Notification.BigTextStyle |
BigTextStyleon a notification:
Notification notif = new Notification.Builder(mContext) .setContentTitle("New mail from " + sender.toString()) .setContentText(subject) .setSmallIcon(R.drawable.new_mail) .setLargeIcon(aBitmap) .setStyle(new Notification.BigTextStyle() .bigText(aVeryLongString)) .build();
See also:
bigContentView
Summary
|
---|
From class android.app.Notification.Style |
|
---|
Notification.BigTextStyle() |
Notification.BigTextStyle(Notification.Builder builder) This constructor was deprecated in API level 24. use BigTextStyle(). |
| |
---|---|
Notification.BigTextStyle | bigText(CharSequence cs) Provide the longer text to be displayed in the big form of the template in place of the content text. |
Notification.BigTextStyle | setBigContentTitle(CharSequence title) Overrides ContentTitle in the big form of the template. |
Notification.BigTextStyle | 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.BigTextStyle
Added in API level 16Notification.BigTextStyle ()
Notification.BigTextStyle
Added in API level 16Notification.BigTextStyle (Notification.Builder builder)
This constructor was deprecated in API level 24.
use
BigTextStyle().
Parameters | |
---|---|
builder | Notification.Builder |
Public methods
bigText
Added in API level 16Notification.BigTextStyle bigText (CharSequence cs)
Provide the longer text to be displayed in the big form of the template in place of the content text.
Parameters | |
---|---|
cs | CharSequence |
Returns | |
---|---|
Notification.BigTextStyle |
setBigContentTitle
Added in API level 16Notification.BigTextStyle 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.BigTextStyle |
setSummaryText
Added in API level 16Notification.BigTextStyle 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.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接口用法
- Android第四十一天(2)