Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

Builder

class Builder
kotlin.Any
   ↳ androidx.textclassifier.TextSelection.Request.Builder

A builder for building TextSelection requests.

Summary

Public constructors
<init>(@NonNull text: CharSequence, @IntRange(0) startIndex: Int, @IntRange(0) endIndex: Int)

Public methods
TextSelection.Request

Builds and returns the request object.

TextSelection.Request.Builder
setDefaultLocales(@Nullable defaultLocales: LocaleListCompat?)

TextSelection.Request.Builder
setExtras(@Nullable extras: Bundle?)

Sets the extended, vendor specific data.

Public constructors

<init>

Builder(
    @NonNull text: CharSequence,
    @IntRange(0) startIndex: Int,
    @IntRange(0) endIndex: Int)
Parameters
text CharSequence: text providing context for the selected text (which is specified by the sub sequence starting at selectionStartIndex and ending at selectionEndIndex)
startIndex Int: start index of the selected part of text
endIndex Int: end index of the selected part of text

Public methods

build

@NonNull fun build(): TextSelection.Request

Builds and returns the request object.

setDefaultLocales

@NonNull fun setDefaultLocales(@Nullable defaultLocales: LocaleListCompat?): TextSelection.Request.Builder
Parameters
defaultLocales LocaleListCompat?: ordered list of locale preferences that may be used to disambiguate the provided text. If no locale preferences exist, set this to null or an empty locale list.
Return
TextSelection.Request.Builder this builder.

setExtras

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

Sets the extended, vendor specific data.

Return
TextSelection.Request.Builder this builder