Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for creating a TextAttribute
.
Summary
Public constructors
Public methods
fun setExtras(extras: PersistableBundle): TextAttribute.Builder
Sets extras data.
Any extra data to supply to the applications. This field is for extended communication with IME if there is data not defined in framework.
setTextConversionSuggestions
fun setTextConversionSuggestions(textConversionSuggestions: MutableList<String!>): TextAttribute.Builder
Sets text conversion suggestions.
Text conversion suggestion is for some transliteration languages which has pronunciation characters and target characters. When the user is typing the pronunciation characters, the input method can insert possible target characters into this list so that the editor authors can provide suggestion before the user enters the complete pronunciation characters.
Parameters |
textConversionSuggestions |
MutableList<String!>: The list of text conversion suggestions. 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,["# TextAttribute.Builder\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/inputmethod/TextAttribute.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.TextAttribute.Builder](#) |\n\nBuilder for creating a [TextAttribute](/reference/kotlin/android/view/inputmethod/TextAttribute).\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TextAttribute](/reference/kotlin/android/view/inputmethod/TextAttribute) | [build](#build())`()` \u003cbr /\u003e |\n| [TextAttribute.Builder](#) | [setExtras](#setExtras(android.os.PersistableBundle))`(`extras:` `[PersistableBundle](../../os/PersistableBundle.html#)`)` Sets extras data. |\n| [TextAttribute.Builder](#) | [setTextConversionSuggestions](#setTextConversionSuggestions(kotlin.collections.MutableList))`(`textConversionSuggestions:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\u003e`)` Sets text conversion suggestions. |\n\nPublic constructors\n-------------------\n\n### Builder\n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): TextAttribute\n```\n\n| Return ||\n|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n| [TextAttribute](/reference/kotlin/android/view/inputmethod/TextAttribute) | a new [TextAttribute](/reference/kotlin/android/view/inputmethod/TextAttribute). This value cannot be `null`. |\n\n### setExtras\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setExtras(extras: PersistableBundle): TextAttribute.Builder\n```\n\nSets extras data.\n\nAny extra data to supply to the applications. This field is for extended communication with IME if there is data not defined in framework.\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------|\n| `extras` | [PersistableBundle](../../os/PersistableBundle.html#): This value cannot be `null`. |\n\n| Return ||\n|----------------------------|--------------------------------------------|\n| [TextAttribute.Builder](#) | This builder. This value cannot be `null`. |\n\n### setTextConversionSuggestions\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setTextConversionSuggestions(textConversionSuggestions: MutableList\u003cString!\u003e): TextAttribute.Builder\n```\n\nSets text conversion suggestions.\n\nText conversion suggestion is for some transliteration languages which has pronunciation characters and target characters. When the user is typing the pronunciation characters, the input method can insert possible target characters into this list so that the editor authors can provide suggestion before the user enters the complete pronunciation characters.\n\n| Parameters ||\n|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `textConversionSuggestions` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\\\u003e: The list of text conversion suggestions. This value cannot be `null`. |\n\n| Return ||\n|----------------------------|-------------------------------------------|\n| [TextAttribute.Builder](#) | This builder This value cannot be `null`. |"]]