Added in API level 34

Builder


class Builder
kotlin.Any
   ↳ android.view.inputmethod.InsertModeGesture.Builder

Builder for InsertModeGesture. This class is not designed to be thread-safe.

Summary

Public constructors

Public methods
InsertModeGesture

Returns InsertModeGesture using parameters in this InsertModeGesture.Builder.

InsertModeGesture.Builder

Sets the CancellationSignal used to cancel the ongoing gesture.

InsertModeGesture.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.

InsertModeGesture.Builder

Sets the insertion point (in screen coordinates) where space will be created for additional text to be inserted.

Public constructors

Builder

Builder()

Public methods

build

Added in API level 34
fun build(): InsertModeGesture

Returns InsertModeGesture using parameters in this InsertModeGesture.Builder.

Return
InsertModeGesture This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if one or more positional parameters are not specified.

setCancellationSignal

Added in API level 34
fun setCancellationSignal(cancellationSignal: CancellationSignal): InsertModeGesture.Builder

Sets the CancellationSignal used to cancel the ongoing gesture.

Parameters
cancellationSignal CancellationSignal: signal to cancel an ongoing gesture. This value cannot be null.
Return
InsertModeGesture.Builder This value cannot be null.

setFallbackText

Added in API level 34
fun setFallbackText(fallbackText: String?): InsertModeGesture.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
InsertModeGesture.Builder This value cannot be null.

setInsertionPoint

Added in API level 34
fun setInsertionPoint(point: PointF): InsertModeGesture.Builder

Sets the insertion point (in screen coordinates) where space will be created for additional text to be inserted.

Parameters
point PointF: This value cannot be null.
Return
InsertModeGesture.Builder This value cannot be null.