TextClassificationContext.Builder


class 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 functions

TextClassificationContext

Builds the text classification context object.

TextClassificationContext.Builder!
setWidgetVersion(widgetVersion: String?)

Sets an optional custom version string for the widget type.

Public constructors

Builder

Builder(packageName: String, widgetType: String)

Initializes a new builder for text classification context objects.

Parameters
packageName: String

the name of the calling package

widgetType: String

the type of widget e.g. WIDGET_TYPE_TEXTVIEW

Returns
Unit

this builder

Public functions

build

fun build(): TextClassificationContext

Builds the text classification context object.

Returns
TextClassificationContext

the built TextClassificationContext object

setWidgetVersion

fun setWidgetVersion(widgetVersion: String?): TextClassificationContext.Builder!

Sets an optional custom version string for the widget type.

Returns
TextClassificationContext.Builder!

this builder