Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#nestedclasses) \| [Constants](https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#lfields) \| [Methods](https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#inhmethods)

# TextBoundsInfo

*** ** * ** ***

` public final class TextBoundsInfo `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.inputmethod.TextBoundsInfo |

<br />

*** ** * ** ***

The text bounds information of a slice of text in the editor.

This class provides IME the layout information of the text within the range from `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getStartIndex()` to `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getEndIndex()`. It's intended to be used by IME as a supplementary API to support handwriting gestures.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder` The builder class to create a `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo` object. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_LINEFEED` The flag indicating that the character is a linefeed character. |
| `int` | `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_PUNCTUATION` The flag indicating that the character is a punctuation. |
| `int` | `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_WHITESPACE` The flag indicating that the character is a whitespace. |
| `int` | `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_LINE_IS_RTL` The flag indicating that the line this character belongs to has RTL line direction. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo>` | `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#CREATOR` The CREATOR to make this class Parcelable. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterBidiLevel(int)(int index) ` The BiDi level of the character at the given `index`. |
| ` void` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterBounds(int,%20android.graphics.RectF)(int index, https://developer.android.com/reference/android/graphics/RectF bounds) ` Set the bounds of the character at the given `index` to the given `https://developer.android.com/reference/android/graphics/RectF`, in the coordinates of the editor. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterFlags(int)(int index) ` Return the flags associated with the character at the given `index`. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getEndIndex()() ` Returns the index of the last character whose bounds information is available in this `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`, exclusive. |
| ` https://developer.android.com/reference/android/text/SegmentFinder` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getGraphemeSegmentFinder()() ` Returns the `https://developer.android.com/reference/android/text/SegmentFinder` that locates the grapheme boundaries. |
| ` https://developer.android.com/reference/android/text/SegmentFinder` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getLineSegmentFinder()() ` Returns the `https://developer.android.com/reference/android/text/SegmentFinder` that locates the line boundaries. |
| ` void` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getMatrix(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix) ` Set the given `https://developer.android.com/reference/android/graphics/Matrix` to be the transformation matrix that is to be applied other positional data in this class. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getOffsetForPosition(float,%20float)(float x, float y) ` Return the index of the closest character to the given position. |
| ` int[]` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getRangeForRect(android.graphics.RectF,%20android.text.SegmentFinder,%20android.text.Layout.TextInclusionStrategy)(https://developer.android.com/reference/android/graphics/RectF area, https://developer.android.com/reference/android/text/SegmentFinder segmentFinder, https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy inclusionStrategy) ` Finds the range of text which is inside the specified rectangle area. |
| ` int` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getStartIndex()() ` Returns the index of the first character whose bounds information is available in this `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`, inclusive. |
| ` https://developer.android.com/reference/android/text/SegmentFinder` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getWordSegmentFinder()() ` Returns the `https://developer.android.com/reference/android/text/SegmentFinder` that locates the word boundaries. |
| ` void` | ` https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Constants

### FLAG_CHARACTER_LINEFEED

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_CHARACTER_LINEFEED
```

The flag indicating that the character is a linefeed character.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setCharacterFlags(int[])`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterFlags(int)`

Constant Value: 2 (0x00000002)

### FLAG_CHARACTER_PUNCTUATION

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_CHARACTER_PUNCTUATION
```

The flag indicating that the character is a punctuation.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setCharacterFlags(int[])`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterFlags(int)`

Constant Value: 4 (0x00000004)

### FLAG_CHARACTER_WHITESPACE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_CHARACTER_WHITESPACE
```

The flag indicating that the character is a whitespace.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setCharacterFlags(int[])`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterFlags(int)`

Constant Value: 1 (0x00000001)

### FLAG_LINE_IS_RTL

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_LINE_IS_RTL
```

The flag indicating that the line this character belongs to has RTL line direction. It's required that all characters in the same line must have the same direction.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setCharacterFlags(int[])`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getCharacterFlags(int)`

Constant Value: 8 (0x00000008)

## Fields

### CREATOR

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<TextBoundsInfo> CREATOR
```

The CREATOR to make this class Parcelable.

<br />

## Public methods

### describeContents

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#writeToParcel(android.os.Parcel,%20int)`, the return value of this method must include the `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. <br /> |

### getCharacterBidiLevel

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCharacterBidiLevel (int index)
```

The BiDi level of the character at the given `index`.   

BiDi level is defined by [the unicode bidirectional algorithm](https://unicode.org/reports/tr9/#Basic_Display_Algorithm). One can determine whether a character's direction is right-to-left (RTL) or left-to-right (LTR) by checking the last bit of the BiDi level. If it's 1, the character is RTL, otherwise the character is LTR. The BiDi level of a character must be in the range of \[0, 125\].

<br />

| Parameters ||
|---|---|
| `index` | `int`: the index of the queried character. <br /> |

| Returns ||
|---|---|
| `int` | the BiDi level of the character, which is an integer in the range of \[0, 125\]. Value is between 0 and 125 inclusive <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IndexOutOfBoundsException` | if the given `index` is out of the range from the `start` to the `end`. |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setCharacterBidiLevel(int[])`

### getCharacterBounds

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getCharacterBounds (int index, 
                RectF bounds)
```

Set the bounds of the character at the given `index` to the given `https://developer.android.com/reference/android/graphics/RectF`, in the coordinates of the editor.

<br />

| Parameters ||
|---|---|
| `index` | `int`: the index of the queried character. <br /> |
| `bounds` | `RectF`: the `https://developer.android.com/reference/android/graphics/RectF` used to receive the result. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `void` | This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IndexOutOfBoundsException` | if the given `index` is out of the range from the `start` to the `end`. |

### getCharacterFlags

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCharacterFlags (int index)
```

Return the flags associated with the character at the given `index`. The flags contain the following information:

- The `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_WHITESPACE` flag, indicating the character is a whitespace.
- The `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_LINEFEED` flag, indicating the character is a linefeed.
- The `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_PUNCTUATION` flag, indicating the character is a punctuation.
- The `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_LINE_IS_RTL` flag, indicating the line this character belongs to has RTL line direction. All characters in the same line must have the same line direction. Check `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getLineSegmentFinder()` for more information of line boundaries.

<br />

<br />

| Parameters ||
|---|---|
| `index` | `int`: the index of the queried character. <br /> |

| Returns ||
|---|---|
| `int` | the flags associated with the queried character. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_WHITESPACE` - `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_LINEFEED` - `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_PUNCTUATION` - `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_LINE_IS_RTL` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IndexOutOfBoundsException` | if the given `index` is out of the range from the `start` to the `end`. |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_WHITESPACE`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_LINEFEED`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_CHARACTER_PUNCTUATION`
- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#FLAG_LINE_IS_RTL`

### getEndIndex

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getEndIndex ()
```

Returns the index of the last character whose bounds information is available in this `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`, exclusive.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setStartAndEnd(int,%20int)`

### getGraphemeSegmentFinder

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SegmentFinder getGraphemeSegmentFinder ()
```

Returns the `https://developer.android.com/reference/android/text/SegmentFinder` that locates the grapheme boundaries.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/SegmentFinder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setGraphemeSegmentFinder(android.text.SegmentFinder)`

### getLineSegmentFinder

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SegmentFinder getLineSegmentFinder ()
```

Returns the `https://developer.android.com/reference/android/text/SegmentFinder` that locates the line boundaries.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/SegmentFinder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setLineSegmentFinder(android.text.SegmentFinder)`

### getMatrix

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getMatrix (Matrix matrix)
```

Set the given `https://developer.android.com/reference/android/graphics/Matrix` to be the transformation matrix that is to be applied other positional data in this class.

<br />

| Parameters ||
|---|---|
| `matrix` | `Matrix`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `void` | This value cannot be `null`. <br /> |

### getOffsetForPosition

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOffsetForPosition (float x, 
                float y)
```

Return the index of the closest character to the given position. It's similar to the text layout API `https://developer.android.com/reference/android/text/Layout#getOffsetForHorizontal(int,%20float)`. And it's mainly used to find the cursor index (the index of the character before which the cursor should be placed) for the given position. It's guaranteed that the returned index is a grapheme break. Check `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getGraphemeSegmentFinder()` for more information.

It's assumed that the editor lays out text in horizontal lines from top to bottom and each line is laid out according to the display algorithm specified in [unicode bidirectional algorithm](https://unicode.org/reports/tr9/#Basic_Display_Algorithm).

This method won't check the text ranges whose line information is missing. For example, the `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`'s range is from index 5 to 15. If the associated `https://developer.android.com/reference/android/text/SegmentFinder` only identifies one line range from 7 to 12. Then this method won't check the text in the ranges of \[5, 7) and \[12, 15).

Under the following conditions, this method will return -1 indicating that no valid character is found:

- The given `y` coordinate is above the first line or below the last line (the first line or the last line is identified by the `https://developer.android.com/reference/android/text/SegmentFinder` returned from `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo#getLineSegmentFinder()`).
- There is no character in this `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`.

<br />

<br />

<br />

| Parameters ||
|---|---|
| `x` | `float`: the x coordinates of the interested location, in the editor's coordinates. <br /> |
| `y` | `float`: the y coordinates of the interested location, in the editor's coordinates. <br /> |

| Returns ||
|---|---|
| `int` | the index of the character whose position is closest to the given location. It will return -1 if it can't find a character. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#getOffsetForHorizontal(int,%20float)`

### getRangeForRect

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getRangeForRect (RectF area, 
                SegmentFinder segmentFinder, 
                Layout.TextInclusionStrategy inclusionStrategy)
```

Finds the range of text which is inside the specified rectangle area. This method is a counterpart of the `https://developer.android.com/reference/android/text/Layout#getRangeForRect(android.graphics.RectF,%20android.text.SegmentFinder,%20android.text.Layout.TextInclusionStrategy)`.

It's assumed that the editor lays out text in horizontal lines from top to bottom and each line is laid out according to the display algorithm specified in [unicode bidirectional algorithm](https://unicode.org/reports/tr9/#Basic_Display_Algorithm).

This method won't check the text ranges whose line information is missing. For example, the `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`'s range is from index 5 to 15. If the associated line `https://developer.android.com/reference/android/text/SegmentFinder` only identifies one line range from 7 to 12. Then this method won't check the text in the ranges of \[5, 7) and \[12, 15).

<br />

<br />

| Parameters ||
|---|---|
| `area` | `RectF`: area for which the text range will be found. This value cannot be `null`. <br /> |
| `segmentFinder` | `SegmentFinder`: SegmentFinder for determining the ranges of text to be considered as a text segment. This value cannot be `null`. <br /> |
| `inclusionStrategy` | `Layout.TextInclusionStrategy`: strategy for determining whether a text segment is inside the specified area. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int[]` | the text range stored in a two element int array. The first element is the start (inclusive) of the text range, and the second element is the end (exclusive) character offsets of the text range, or null if there are no text segments inside the area. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#getRangeForRect(android.graphics.RectF,%20android.text.SegmentFinder,%20android.text.Layout.TextInclusionStrategy)`

### getStartIndex

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getStartIndex ()
```

Returns the index of the first character whose bounds information is available in this `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo`, inclusive.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setStartAndEnd(int,%20int)`

### getWordSegmentFinder

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public SegmentFinder getWordSegmentFinder ()
```

Returns the `https://developer.android.com/reference/android/text/SegmentFinder` that locates the word boundaries.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/SegmentFinder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/inputmethod/TextBoundsInfo.Builder#setWordSegmentFinder(android.text.SegmentFinder)`

### writeToParcel

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. <br /> |