Google 致力于为黑人社区推动种族平等。查看具体举措

Builder

class Builder
kotlin.Any
   ↳ androidx.textclassifier.ConversationAction.Builder

Builder class to construct ConversationAction.

Summary

Public constructors
<init>(@NonNull actionType: String)

Public methods
ConversationAction

Builds the ConversationAction object.

ConversationAction.Builder
setAction(@Nullable action: RemoteActionCompat?)

Sets an action that may be performed on the given conversation.

ConversationAction.Builder
setConfidenceScore(@FloatRange(0, 1) score: Float)

Sets the confident score.

ConversationAction.Builder
setExtras(@Nullable extras: Bundle?)

Sets the extended data for the conversation action object.

ConversationAction.Builder
setTextReply(@Nullable textReply: CharSequence?)

Sets a text reply that may be performed on the given conversation.

Public constructors

<init>

Builder(@NonNull actionType: String)

Public methods

build

@NonNull fun build(): ConversationAction

Builds the ConversationAction object.

setAction

@NonNull fun setAction(@Nullable action: RemoteActionCompat?): ConversationAction.Builder

Sets an action that may be performed on the given conversation.

setConfidenceScore

@NonNull fun setConfidenceScore(@FloatRange(0, 1) score: Float): ConversationAction.Builder

Sets the confident score.

setExtras

@NonNull fun setExtras(@Nullable extras: Bundle?): ConversationAction.Builder

Sets the extended data for the conversation action object.

setTextReply

@NonNull fun setTextReply(@Nullable textReply: CharSequence?): ConversationAction.Builder

Sets a text reply that may be performed on the given conversation.