Builder
class Builder
| kotlin.Any | |
| ↳ | android.view.inputmethod.InsertGesture.Builder |
Builder for InsertGesture. This class is not designed to be thread-safe.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| InsertGesture |
build() |
| InsertGesture.Builder |
setFallbackText(fallbackText: String?)Set fallback text that will be committed at current cursor position if there is no applicable text beneath the area of gesture. |
| InsertGesture.Builder |
setInsertionPoint(point: PointF)Sets the insertion point (in screen coordinates) where |
| InsertGesture.Builder |
setTextToInsert(text: String)Set the text that will be inserted at |
Public constructors
Builder
Builder()
Public methods
build
fun build(): InsertGesture
| Return | |
|---|---|
InsertGesture |
InsertGesture using parameters in this InsertGesture.Builder. This value cannot be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if one or more positional parameters are not specified. |
setFallbackText
fun setFallbackText(fallbackText: String?): InsertGesture.Builder
Set fallback text that will be committed at current cursor position if there is no applicable text beneath the area of gesture.
| Parameters | |
|---|---|
fallbackText |
String?: text to set |
| Return | |
|---|---|
InsertGesture.Builder |
This value cannot be null. |
setInsertionPoint
fun setInsertionPoint(point: PointF): InsertGesture.Builder
Sets the insertion point (in screen coordinates) where setTextToInsert(java.lang.String) should be inserted.
| Parameters | |
|---|---|
point |
PointF: This value cannot be null. |
| Return | |
|---|---|
InsertGesture.Builder |
This value cannot be null. |
setTextToInsert
fun setTextToInsert(text: String): InsertGesture.Builder
Set the text that will be inserted at setInsertionPoint(android.graphics.PointF). When set with an empty string, cursor will be moved to getInsertionPoint() and no text would be inserted.
| Parameters | |
|---|---|
text |
String: This value cannot be null. |
| Return | |
|---|---|
InsertGesture.Builder |
This value cannot be null. |