Stay organized with collections
Save and categorize content based on your preferences.
SpellCheckerSessionParams
open class SpellCheckerSessionParams
Parameters used to create a SpellCheckerSession
.
Summary
Public methods |
open Bundle |
Returns a bundle containing extra parameters for the spell checker.
|
open Locale? |
Returns the locale in which the spell checker should operate.
|
open Int |
Returns a bitmask of SuggestionsInfo attributes that the spell checker can set in SuggestionsInfo it returns.
|
open Boolean |
Returns true if the user's spell checker language settings should be used to determine the spell checker locale.
|
Public methods
getLocale
open fun getLocale(): Locale?
Returns the locale in which the spell checker should operate.
Return |
Locale? |
This value may be null . |
getSupportedAttributes
open fun getSupportedAttributes(): Int
Returns a bitmask of SuggestionsInfo
attributes that the spell checker can set in SuggestionsInfo
it returns.
shouldReferToSpellCheckerLanguageSettings
open fun shouldReferToSpellCheckerLanguageSettings(): Boolean
Returns true if the user's spell checker language settings should be used to determine the spell checker locale.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# SpellCheckerSession.SpellCheckerSessionParams\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSpellCheckerSessionParams\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams \"View this page in Java\") \n\n```\nopen class SpellCheckerSessionParams\n```\n\n|---|-----------------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.view.textservice.SpellCheckerSession.SpellCheckerSessionParams](#) |\n\nParameters used to create a [SpellCheckerSession](/reference/kotlin/android/view/textservice/SpellCheckerSession).\n\nSummary\n-------\n\n| Nested classes ||\n|---|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams.Builder) Builder of [SpellCheckerSessionParams](#). |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Bundle](../../os/Bundle.html#) | [getExtras](#getExtras())`()` Returns a bundle containing extra parameters for the spell checker. |\n| open [Locale](../../../java/util/Locale.html#)? | [getLocale](#getLocale())`()` Returns the locale in which the spell checker should operate. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSupportedAttributes](#getSupportedAttributes())`()` Returns a bitmask of [SuggestionsInfo](/reference/kotlin/android/view/textservice/SuggestionsInfo) attributes that the spell checker can set in [SuggestionsInfo](/reference/kotlin/android/view/textservice/SuggestionsInfo) it returns. |\n| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [shouldReferToSpellCheckerLanguageSettings](#shouldReferToSpellCheckerLanguageSettings())`()` Returns true if the user's spell checker language settings should be used to determine the spell checker locale. |\n\nPublic methods\n--------------\n\n### getExtras\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getExtras(): Bundle\n```\n\nReturns a bundle containing extra parameters for the spell checker.\n\nThis bundle can be used to pass implementation-specific parameters to the [android.service.textservice.SpellCheckerService](../../service/textservice/SpellCheckerService.html#) implementation.\n\n| Return ||\n|---------------------------------|------------------------------|\n| [Bundle](../../os/Bundle.html#) | This value cannot be `null`. |\n\n**See Also**\n\n- [android.service.textservice.SpellCheckerService.Session#getBundle()](../../service/textservice/SpellCheckerService.Session.html#getBundle()) \n\n### getLocale\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getLocale(): Locale?\n```\n\nReturns the locale in which the spell checker should operate.\n\n| Return ||\n|--------------------------------------------|---------------------------|\n| [Locale](../../../java/util/Locale.html#)? | This value may be `null`. |\n\n**See Also**\n\n- [android.service.textservice.SpellCheckerService.Session#getLocale()](../../service/textservice/SpellCheckerService.Session.html#getLocale()) \n\n### getSupportedAttributes\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getSupportedAttributes(): Int\n```\n\nReturns a bitmask of [SuggestionsInfo](/reference/kotlin/android/view/textservice/SuggestionsInfo) attributes that the spell checker can set in [SuggestionsInfo](/reference/kotlin/android/view/textservice/SuggestionsInfo) it returns.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is either `0` or a combination of [android.view.textservice.SuggestionsInfo#RESULT_ATTR_IN_THE_DICTIONARY](/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_IN_THE_DICTIONARY:kotlin.Int), [android.view.textservice.SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_TYPO](/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_TYPO:kotlin.Int), [android.view.textservice.SuggestionsInfo#RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS](/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS:kotlin.Int), [android.view.textservice.SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR](/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR:kotlin.Int), and [android.view.textservice.SuggestionsInfo#RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS](/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS:kotlin.Int) |\n\n**See Also**\n\n- [android.service.textservice.SpellCheckerService.Session#getSupportedAttributes()](../../service/textservice/SpellCheckerService.Session.html#getSupportedAttributes()) \n\n### shouldReferToSpellCheckerLanguageSettings\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun shouldReferToSpellCheckerLanguageSettings(): Boolean\n```\n\nReturns true if the user's spell checker language settings should be used to determine the spell checker locale."]]