Added in API level 31
    Builder
class Builder
| kotlin.Any | |
| ↳ | android.view.translation.TranslationContext.Builder | 
A builder for TranslationContext
Summary
| Public constructors | |
|---|---|
| Builder(sourceSpec: TranslationSpec, targetSpec: TranslationSpec)Creates a new Builder. | |
| Public methods | |
|---|---|
| TranslationContext | build()Builds the instance. | 
| TranslationContext.Builder | setTranslationFlags(value: Int)Translation flags to be used by the  | 
Public constructors
Builder
Added in API level 31
      Builder(
sourceSpec: TranslationSpec,
targetSpec: TranslationSpec)
Creates a new Builder.
| Parameters | |
|---|---|
| sourceSpec | TranslationSpec: TranslationSpecdescribing the source data to be translated. This value cannot benull. | 
| targetSpec | TranslationSpec: TranslationSpecdescribing the target translated data. This value cannot benull. | 
Public methods
build
Added in API level 31
      fun build(): TranslationContext
Builds the instance. This builder should not be touched after calling this!
| Return | |
|---|---|
| TranslationContext | This value cannot be null. | 
setTranslationFlags
Added in API level 31
      fun setTranslationFlags(value: Int): TranslationContext.Builder
Translation flags to be used by the Translator
| Parameters | |
|---|---|
| value | Int: Value is either 0or a combination ofandroid.view.translation.TranslationContext#FLAG_LOW_LATENCY,android.view.translation.TranslationContext#FLAG_TRANSLITERATION, andandroid.view.translation.TranslationContext#FLAG_DEFINITIONS | 
| Return | |
|---|---|
| TranslationContext.Builder | This value cannot be null. | 
