Stay organized with collections
Save and categorize content based on your preferences.
AutoText
open class AutoText
This class accesses a dictionary of corrections to frequent misspellings.
Summary
Public methods |
open static String! |
Retrieves a possible spelling correction for the specified range of text.
|
open static Int |
Returns the size of the auto text dictionary.
|
Public methods
get
open static fun get(
src: CharSequence!,
start: Int,
end: Int,
view: View!
): String!
Retrieves a possible spelling correction for the specified range of text. Returns null if no correction can be found. The View is used to get the current Locale and Resources.
getSize
open static fun getSize(view: View!): Int
Returns the size of the auto text dictionary. The return value can be zero if there is no auto correction data available for the current locale.
Parameters |
view |
View!: used to retrieve the current Locale and Resources. |
Return |
Int |
the number of entries in the auto text dictionary |
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,["# AutoText\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAutoText\n========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/text/AutoText \"View this page in Java\") \n\n```\nopen class AutoText\n```\n\n|---|----------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.text.AutoText](#) |\n\nThis class accesses a dictionary of corrections to frequent misspellings.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [get](#get(kotlin.CharSequence,%20kotlin.Int,%20kotlin.Int,%20android.view.View))`(`src:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`, `start:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `end:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `view:` `[View](../view/View.html#)!`)` Retrieves a possible spelling correction for the specified range of text. |\n| open static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSize](#getSize(android.view.View))`(`view:` `[View](../view/View.html#)!`)` Returns the size of the auto text dictionary. |\n\nPublic methods\n--------------\n\n### get\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun get(\n src: CharSequence!, \n start: Int, \n end: Int, \n view: View!\n): String!\n```\n\nRetrieves a possible spelling correction for the specified range of text. Returns null if no correction can be found. The View is used to get the current Locale and Resources. \n\n### getSize\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun getSize(view: View!): Int\n```\n\nReturns the size of the auto text dictionary. The return value can be zero if there is no auto correction data available for the current locale.\n\n| Parameters ||\n|--------|---------------------------------------------------------------------------------|\n| `view` | [View](../view/View.html#)!: used to retrieve the current Locale and Resources. |\n\n| Return ||\n|----------------------------------------------------------------------------|---------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the number of entries in the auto text dictionary |"]]