Added in API level 28

Builder


class Builder
kotlin.Any
   ↳ android.view.textclassifier.TextClassificationContext.Builder

A builder for building a TextClassification context.

Summary

Public constructors
Builder(packageName: String, widgetType: String)

Initializes a new builder for text classification context objects.

Public methods
TextClassificationContext

Builds the text classification context object.

TextClassificationContext.Builder!
setWidgetVersion(widgetVersion: String?)

Sets an optional custom version string for the widget type.

Public constructors

Public methods

build

Added in API level 28
fun build(): TextClassificationContext

Builds the text classification context object.

Return
TextClassificationContext the built TextClassificationContext object This value cannot be null.

setWidgetVersion

Added in API level 28
fun setWidgetVersion(widgetVersion: String?): TextClassificationContext.Builder!

Sets an optional custom version string for the widget type.

Parameters
widgetVersion String?: This value may be null.
Return
TextClassificationContext.Builder! this builder