Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

Builder

class Builder
kotlin.Any
   ↳ androidx.textclassifier.TextLinks.Builder

A builder to construct a TextLinks instance.

Summary

Public constructors
<init>(@NonNull fullText: CharSequence)

Create a new TextLinks.

Public methods
TextLinks.Builder
addLink(start: Int, end: Int, @NonNull entityScores: MutableMap<String!, Float!>)

Adds a TextLink.

TextLinks.Builder

Removes all TextLinks.

TextLinks.Builder
setExtras(@Nullable extras: Bundle?)

Sets the extended, vendor specific data.

TextLinks

Constructs a TextLinks instance.

Public constructors

<init>

Builder(@NonNull fullText: CharSequence)

Create a new TextLinks.Builder.

Parameters
fullText CharSequence: The full text to annotate with links.

Public methods

addLink

@NonNull fun addLink(start: Int, end: Int, @NonNull entityScores: MutableMap<String!, Float!>): TextLinks.Builder

Adds a TextLink.

Return
TextLinks.Builder: this instance.
Exceptions
IllegalArgumentException if entityScores is null or empty.

clearTextLinks

@NonNull fun clearTextLinks(): TextLinks.Builder

Removes all TextLinks.

setExtras

@NonNull fun setExtras(@Nullable extras: Bundle?): TextLinks.Builder

Sets the extended, vendor specific data.

build

@NonNull fun build(): TextLinks

Constructs a TextLinks instance.

Return
TextLinks: the constructed TextLinks.