TextClassifierEvent.TextSelectionEvent.Builder
public
static
final
class
TextClassifierEvent.TextSelectionEvent.Builder
extends Builder<TextClassifierEvent.TextSelectionEvent.Builder>
java.lang.Object | ||
↳ | android.view.textclassifier.TextClassifierEvent.Builder<android.view.textclassifier.TextClassifierEvent.TextSelectionEvent.Builder> | |
↳ | android.view.textclassifier.TextClassifierEvent.TextSelectionEvent.Builder |
Builder class for TextSelectionEvent
.
Summary
Public constructors | |
---|---|
Builder(int eventType)
Creates a builder for building |
Public methods | |
---|---|
TextClassifierEvent.TextSelectionEvent
|
build()
Builds and returns a |
TextClassifierEvent.TextSelectionEvent.Builder
|
setRelativeSuggestedWordEndIndex(int relativeSuggestedWordEndIndex)
Sets the relative word (exclusive) index of the end of the smart selection. |
TextClassifierEvent.TextSelectionEvent.Builder
|
setRelativeSuggestedWordStartIndex(int relativeSuggestedWordStartIndex)
Sets the relative word index of the start of the smart selection. |
TextClassifierEvent.TextSelectionEvent.Builder
|
setRelativeWordEndIndex(int relativeWordEndIndex)
Sets the relative word (exclusive) index of the end of the selection. |
TextClassifierEvent.TextSelectionEvent.Builder
|
setRelativeWordStartIndex(int relativeWordStartIndex)
Sets the relative word index of the start of the selection. |
Inherited methods | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||
|
Public constructors
Builder
public Builder (int eventType)
Creates a builder for building TextSelectionEvent
s.
Public methods
build
public TextClassifierEvent.TextSelectionEvent build ()
Builds and returns a TextSelectionEvent
.
Returns | |
---|---|
TextClassifierEvent.TextSelectionEvent |
This value cannot be null . |
setRelativeSuggestedWordEndIndex
public TextClassifierEvent.TextSelectionEvent.Builder setRelativeSuggestedWordEndIndex (int relativeSuggestedWordEndIndex)
Sets the relative word (exclusive) index of the end of the smart selection.
Parameters | |
---|---|
relativeSuggestedWordEndIndex |
int |
Returns | |
---|---|
TextClassifierEvent.TextSelectionEvent.Builder |
This value cannot be null . |
setRelativeSuggestedWordStartIndex
public TextClassifierEvent.TextSelectionEvent.Builder setRelativeSuggestedWordStartIndex (int relativeSuggestedWordStartIndex)
Sets the relative word index of the start of the smart selection.
Parameters | |
---|---|
relativeSuggestedWordStartIndex |
int |
Returns | |
---|---|
TextClassifierEvent.TextSelectionEvent.Builder |
This value cannot be null . |
setRelativeWordEndIndex
public TextClassifierEvent.TextSelectionEvent.Builder setRelativeWordEndIndex (int relativeWordEndIndex)
Sets the relative word (exclusive) index of the end of the selection.
Parameters | |
---|---|
relativeWordEndIndex |
int |
Returns | |
---|---|
TextClassifierEvent.TextSelectionEvent.Builder |
This value cannot be null . |
setRelativeWordStartIndex
public TextClassifierEvent.TextSelectionEvent.Builder setRelativeWordStartIndex (int relativeWordStartIndex)
Sets the relative word index of the start of the selection.
Parameters | |
---|---|
relativeWordStartIndex |
int |
Returns | |
---|---|
TextClassifierEvent.TextSelectionEvent.Builder |
This value cannot be null . |