How can I disable spelling corrections in an EditText's soft-keyboard programmatically in Android? The user can disable it from settings, but I need to disable it in my application.
Asked
Active
Viewed 1,161 times
1
-
2Possible duplicate of [How to disable spelling corrections programmatically in Android](https://stackoverflow.com/questions/7330234/how-to-disable-spelling-corrections-programmatically-in-android) – Sergio Aug 14 '19 at 07:48
1 Answers
1
Android provides a Spell Check service by default.
To disable this service:
For TextView:
android:inputType="textFilter"
For EditText:
android:inputType="textNoSuggestions"
Or programatically in activity:
setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS)
If your EditText is multiline:
android:inputType="textMultiLine|textNoSuggestions"
For the android version 8.0 or above :
android:importantForAutofill="no"
textNoSuggestions does not work in every keyboard. So you can check with android:inputType="textVisiblePassword"
or android:inputType="textUri”
.

Kabir
- 852
- 7
- 11
-
If you find helpful answer ,you should accept answer and close the question. – Kabir Sep 17 '19 at 06:48
-