java.lang.Object | |
↳ | android.view.inputmethod.CursorAnchorInfo.Builder |
Builder for CursorAnchorInfo
. This class is not designed to be thread-safe.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the bounding box of the character specified with the index.
| |||||||||||
Resets the internal state so that this instance can be reused to build another
instance of
CursorAnchorInfo .
| |||||||||||
Sets the text range of the composing text.
| |||||||||||
Sets the location of the text insertion point (zero width cursor) as a rectangle in
local coordinates.
| |||||||||||
Sets the matrix that transforms local coordinates into screen coordinates.
| |||||||||||
Sets the text range of the selection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adds the bounding box of the character specified with the index.
index | index of the character in Java chars units. Must be specified in ascending order across successive calls. |
---|---|
left | x coordinate of the left edge of the character in local coordinates. |
top | y coordinate of the top edge of the character in local coordinates. |
right | x coordinate of the right edge of the character in local coordinates. |
bottom | y coordinate of the bottom edge of the character in local coordinates. |
flags | flags for this character bounds. See FLAG_HAS_VISIBLE_REGION ,
FLAG_HAS_INVISIBLE_REGION and FLAG_IS_RTL . These flags must be
specified when necessary. |
IllegalArgumentException | If the index is a negative value, or not greater than all of the previously called indices. |
---|
CursorAnchorInfo
using parameters in this CursorAnchorInfo.Builder
.IllegalArgumentException | if one or more positional parameters are specified but
the coordinate transformation matrix is not provided via setMatrix(Matrix) .
|
---|
Resets the internal state so that this instance can be reused to build another
instance of CursorAnchorInfo
.
Sets the text range of the composing text. Calling this can be skipped if there is no composing text.
composingTextStart | index where the composing text starts. |
---|---|
composingText | the entire composing text. |
Sets the location of the text insertion point (zero width cursor) as a rectangle in local coordinates. Calling this can be skipped when there is no text insertion point; however if there is an insertion point, editors must call this method.
horizontalPosition | horizontal position of the insertion marker, in the local
coordinates that will be transformed with the transformation matrix when rendered on the
screen. This should be calculated or compatible with
getPrimaryHorizontal(int) . |
---|---|
lineTop | vertical position of the insertion marker, in the local coordinates that
will be transformed with the transformation matrix when rendered on the screen. This
should be calculated or compatible with getLineTop(int) . |
lineBaseline | vertical position of the insertion marker, in the local coordinates
that will be transformed with the transformation matrix when rendered on the screen. This
should be calculated or compatible with getLineBaseline(int) . |
lineBottom | vertical position of the insertion marker, in the local coordinates
that will be transformed with the transformation matrix when rendered on the screen. This
should be calculated or compatible with getLineBottom(int) . |
flags | flags of the insertion marker. See FLAG_HAS_VISIBLE_REGION for
example.
|
Sets the matrix that transforms local coordinates into screen coordinates.
matrix | transformation matrix from local coordinates into screen coordinates. null is interpreted as an identity matrix. |
---|
Sets the text range of the selection. Calling this can be skipped if there is no selection.