Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for InsertModeGesture
. This class is not designed to be thread-safe.
Summary
Public constructors
Public methods
setFallbackText
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 |
setInsertionPoint
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 . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# InsertModeGesture.Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/inputmethod/InsertModeGesture.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|---------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.view.inputmethod.InsertModeGesture.Builder](#) |\n\nBuilder for [InsertModeGesture](/reference/kotlin/android/view/inputmethod/InsertModeGesture). This class is not designed to be thread-safe.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [InsertModeGesture](/reference/kotlin/android/view/inputmethod/InsertModeGesture) | [build](#build())`()` Returns [InsertModeGesture](/reference/kotlin/android/view/inputmethod/InsertModeGesture) using parameters in this [InsertModeGesture.Builder](#). |\n| [InsertModeGesture.Builder](#) | [setCancellationSignal](#setCancellationSignal(android.os.CancellationSignal))`(`cancellationSignal:` `[CancellationSignal](../../os/CancellationSignal.html#)`)` Sets the [CancellationSignal](../../os/CancellationSignal.html#) used to cancel the ongoing gesture. |\n| [InsertModeGesture.Builder](#) | [setFallbackText](#setFallbackText(kotlin.String))`(`fallbackText:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` Set fallback text that will be committed at current cursor position if there is no applicable text beneath the area of gesture. |\n| [InsertModeGesture.Builder](#) | [setInsertionPoint](#setInsertionPoint(android.graphics.PointF))`(`point:` `[PointF](../../graphics/PointF.html#)`)` Sets the insertion point (in screen coordinates) where space will be created for additional text to be inserted. |\n\nPublic constructors\n-------------------\n\n### Builder\n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): InsertModeGesture\n```\n\nReturns [InsertModeGesture](/reference/kotlin/android/view/inputmethod/InsertModeGesture) using parameters in this [InsertModeGesture.Builder](#).\n\n| Return ||\n|-----------------------------------------------------------------------------------|------------------------------|\n| [InsertModeGesture](/reference/kotlin/android/view/inputmethod/InsertModeGesture) | This value cannot be `null`. |\n\n| Exceptions ||\n|--------------------------------------|---------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | if one or more positional parameters are not specified. |\n\n### setCancellationSignal\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setCancellationSignal(cancellationSignal: CancellationSignal): InsertModeGesture.Builder\n```\n\nSets the [CancellationSignal](../../os/CancellationSignal.html#) used to cancel the ongoing gesture.\n\n| Parameters ||\n|----------------------|----------------------------------------------------------------------------------------------------------------------------|\n| `cancellationSignal` | [CancellationSignal](../../os/CancellationSignal.html#): signal to cancel an ongoing gesture. This value cannot be `null`. |\n\n| Return ||\n|--------------------------------|------------------------------|\n| [InsertModeGesture.Builder](#) | This value cannot be `null`. |\n\n### setFallbackText\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setFallbackText(fallbackText: String?): InsertModeGesture.Builder\n```\n\nSet fallback text that will be committed at current cursor position if there is no applicable text beneath the area of gesture.\n\n| Parameters ||\n|----------------|------------------------------------------------------------------------------------------------|\n| `fallbackText` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?: text to set |\n\n| Return ||\n|--------------------------------|------------------------------|\n| [InsertModeGesture.Builder](#) | This value cannot be `null`. |\n\n### setInsertionPoint\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setInsertionPoint(point: PointF): InsertModeGesture.Builder\n```\n\nSets the insertion point (in screen coordinates) where space will be created for additional text to be inserted.\n\n| Parameters ||\n|---------|---------------------------------------------------------------------|\n| `point` | [PointF](../../graphics/PointF.html#): This value cannot be `null`. |\n\n| Return ||\n|--------------------------------|------------------------------|\n| [InsertModeGesture.Builder](#) | This value cannot be `null`. |"]]