Reputation: 155
I have been building relatively simple Android Keyboard from ground up following this Android SoftKeyboard sample. I can't seem to find any solution that would allow me to disable spell-checking functionality with my custom keyboard. Every text typed has a black underline indicating possible spell error even though I have not implemented spell-checking services.
Tried to find appropriate code fragment that disables spell-checking in Android/LatinIME but in vain.
Any tips are highly appreciated
Upvotes: 1
Views: 607
Reputation: 93569
The black underline is called composing text. Its used to show text that may be replaced by an autocorrect or other action- it isn't fully finished text yet. Its done by calling setComposingText. Instead of using that, use commitText and it won't use the underline version (and a dozen other differences under the hood).
Note that if you're exactly following the linked code you'll have to make a lot of other changes too, to move from word at a time to letter at a time input (composing text is completely replaced each time a new input is made, so you need to send down the entire word until you commitText of complete the composing text. SO you probably have a but of work to change it to use commitText).
Upvotes: 3