Added in API level 31

Builder


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

A builder for TranslationRequest

Summary

Public constructors

Public methods
TranslationRequest

Builds the instance.

TranslationRequest.Builder
setFlags(value: Int)

Request flags.

TranslationRequest.Builder

List of TranslationRequestValues to be translated.

TranslationRequest.Builder

List of ViewTranslationRequests to be translated.

Public constructors

Builder

Added in API level 31
Builder()

Public methods

build

Added in API level 31
fun build(): TranslationRequest

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

Return
TranslationRequest This value cannot be null.

setTranslationRequestValues

Added in API level 31
fun setTranslationRequestValues(value: MutableList<TranslationRequestValue!>): TranslationRequest.Builder

List of TranslationRequestValues to be translated. The index of entries in this list will be their respective key in the android.util.SparseArray returned by calling TranslationResponse#getTranslationResponseValues().

Parameters
value MutableList<TranslationRequestValue!>: This value cannot be null.
Return
TranslationRequest.Builder This value cannot be null.

setViewTranslationRequests

Added in API level 31
fun setViewTranslationRequests(value: MutableList<ViewTranslationRequest!>): TranslationRequest.Builder

List of ViewTranslationRequests to be translated. The index of entries in this list will be their respective key in the android.util.SparseArray returned by calling TranslationResponse#getViewTranslationResponses().

Parameters
value MutableList<ViewTranslationRequest!>: This value cannot be null.
Return
TranslationRequest.Builder This value cannot be null.