Most visited

Recently visited

NotificationCompat.BigPictureStyle

public static class NotificationCompat.BigPictureStyle
extends NotificationCompat.Style

java.lang.Object
   ↳ android.support.v4.app.NotificationCompat.Style
     ↳ android.support.v4.app.NotificationCompat.BigPictureStyle


帮助程序类用于生成包含大图像附件的大幅面通知。
如果平台不提供大幅面通知,则此方法不起作用。 用户将始终看到正常的通知视图。
这个类是一个“重建器”:它附着到一个Builder对象并修改它的行为,如下所示:

 Notification notif = new Notification.Builder(mContext)
     .setContentTitle("New photo from " + sender.toString())
     .setContentText(subject)
     .setSmallIcon(R.drawable.new_post)
     .setLargeIcon(aBitmap)
     .setStyle(new Notification.BigPictureStyle()
         .bigPicture(aBigBitmap))
     .build();
 

也可以看看:

Summary

Public constructors

NotificationCompat.BigPictureStyle()
NotificationCompat.BigPictureStyle(NotificationCompat.Builder builder)

Public methods

NotificationCompat.BigPictureStyle bigLargeIcon(Bitmap b)

显示大通知时覆盖大图标。

NotificationCompat.BigPictureStyle bigPicture(Bitmap b)

提供要用作BigPicture通知的有效内容的位图。

NotificationCompat.BigPictureStyle setBigContentTitle(CharSequence title)

覆盖模板大表单中的ContentTitle。

NotificationCompat.BigPictureStyle setSummaryText(CharSequence cs)

将详细信息部分的第一行设置为模板的大表格。

Inherited methods

From class android.support.v4.app.NotificationCompat.Style
From class java.lang.Object

Public constructors

NotificationCompat.BigPictureStyle

NotificationCompat.BigPictureStyle ()

NotificationCompat.BigPictureStyle

NotificationCompat.BigPictureStyle (NotificationCompat.Builder builder)

Parameters
builder NotificationCompat.Builder

Public methods

bigLargeIcon

NotificationCompat.BigPictureStyle bigLargeIcon (Bitmap b)

显示大通知时覆盖大图标。

Parameters
b Bitmap
Returns
NotificationCompat.BigPictureStyle

bigPicture

NotificationCompat.BigPictureStyle bigPicture (Bitmap b)

提供要用作BigPicture通知的有效内容的位图。

Parameters
b Bitmap
Returns
NotificationCompat.BigPictureStyle

setBigContentTitle

NotificationCompat.BigPictureStyle setBigContentTitle (CharSequence title)

覆盖模板大表单中的ContentTitle。 这默认为传递给setContentTitle()的值。

Parameters
title CharSequence
Returns
NotificationCompat.BigPictureStyle

setSummaryText

NotificationCompat.BigPictureStyle setSummaryText (CharSequence cs)

将详细信息部分的第一行设置为模板的大表格。

Parameters
cs CharSequence
Returns
NotificationCompat.BigPictureStyle

Hooray!