Added in API level 31

Builder

class Builder
kotlin.Any
   ↳ android.view.translation.ViewTranslationResponse.Builder

A builder for ViewTranslationResponse

Summary

Public constructors
Builder(autofillId: AutofillId)

Creates a new Builder.

Public methods
ViewTranslationResponse

Builds the instance.

ViewTranslationResponse.Builder!

Sets the corresponding TranslationResponseValue for the provided key.

Public constructors

Builder

Added in API level 31
Builder(autofillId: AutofillId)

Creates a new Builder.

Parameters
autofillId AutofillId: The AutofillId of the view associated with this response. This value cannot be null.

Public methods

build

Added in API level 31
fun build(): ViewTranslationResponse

Builds the instance. This builder should not be touched after calling this!

Return
ViewTranslationResponse This value cannot be null.

setValue

Added in API level 31
fun setValue(
    key: String!,
    value: TranslationResponseValue!
): ViewTranslationResponse.Builder!

Sets the corresponding TranslationResponseValue for the provided key.

Parameters
key String!: The key for this translation response value.
value TranslationResponseValue!: the translation response value holding the translated content.
Return
ViewTranslationResponse.Builder! this builder.