Most visited

Recently visited

NotificationCompat.Action.Builder

public static final class NotificationCompat.Action.Builder
extends Object

java.lang.Object
   ↳ android.support.v4.app.NotificationCompat.Action.Builder


NotificationCompat.Action对象的生成器类。

Summary

Public constructors

NotificationCompat.Action.Builder(int icon, CharSequence title, PendingIntent intent)

NotificationCompat.Action对象构建一个新的构建器。

NotificationCompat.Action.Builder(NotificationCompat.Action action)

构造一个新的建设者 NotificationCompat.Action使用领域从对象 NotificationCompat.Action

Public methods

NotificationCompat.Action.Builder addExtras(Bundle extras)

将其他元数据合并到此构建器中。

NotificationCompat.Action.Builder addRemoteInput(RemoteInput remoteInput)

添加要在发送此操作时从用户收集的输入。

NotificationCompat.Action build()

组合所有已设置的选项并返回一个新的 NotificationCompat.Action对象。

NotificationCompat.Action.Builder extend(NotificationCompat.Action.Extender extender)

将扩展程序应用于此操作构建器。

Bundle getExtras()

获取此构建器使用的元数据包。

NotificationCompat.Action.Builder setAllowGeneratedReplies(boolean allowGeneratedReplies)

设置平台是否应自动生成可能的答复以添加到 getChoices()

Inherited methods

From class java.lang.Object

Public constructors

NotificationCompat.Action.Builder

NotificationCompat.Action.Builder (int icon, 
                CharSequence title, 
                PendingIntent intent)

NotificationCompat.Action对象构建一个新的构建器。

Parameters
icon int: icon to show for this action
title CharSequence: the title of the action
intent PendingIntent: the PendingIntent to fire when users trigger this action

NotificationCompat.Action.Builder

NotificationCompat.Action.Builder (NotificationCompat.Action action)

构造一个新的建设者 NotificationCompat.Action使用领域从对象 NotificationCompat.Action

Parameters
action NotificationCompat.Action: the action to read fields from.

Public methods

addExtras

NotificationCompat.Action.Builder addExtras (Bundle extras)

将其他元数据合并到此构建器中。

Bundle中的值将替换此Builder中现有的额外值。

Parameters
extras Bundle
Returns
NotificationCompat.Action.Builder

也可以看看:

addRemoteInput

NotificationCompat.Action.Builder addRemoteInput (RemoteInput remoteInput)

添加要在发送此操作时从用户收集的输入。 通过使用getResultsFromIntent(Intent)函数可以从已启动的意图中检索响应值。

Parameters
remoteInput RemoteInput: a RemoteInput to add to the action
Returns
NotificationCompat.Action.Builder this object for method chaining

build

NotificationCompat.Action build ()

结合所有已设置的选项并返回一个新的 NotificationCompat.Action对象。

Returns
NotificationCompat.Action the built action

extend

NotificationCompat.Action.Builder extend (NotificationCompat.Action.Extender extender)

将扩展程序应用于此操作构建器。 扩展器可用于在此构建器上添加元数据或更改选项。

Parameters
extender NotificationCompat.Action.Extender
Returns
NotificationCompat.Action.Builder

getExtras

Bundle getExtras ()

获取此构建器使用的元数据包。

返回的Bundle与此Builder共享。

Returns
Bundle

setAllowGeneratedReplies

NotificationCompat.Action.Builder setAllowGeneratedReplies (boolean allowGeneratedReplies)

设置平台是否应自动生成可能的答复以添加到getChoices() 如果NotificationCompat.Action没有RemoteInput ,则不起作用。

Parameters
allowGeneratedReplies boolean: true to allow generated replies, false otherwise
Returns
NotificationCompat.Action.Builder this object for method chaining The default value is false

Hooray!