Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable spelling corrections programmatically in Android

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.

Is there any way to do this?

like image 573
Adem Avatar asked Sep 07 '11 07:09

Adem


People also ask

How do I turn off the spell check on my Android?

To turn spell check on or off on Android, you need to go to Settings > System > Languages and input > Virtual keyboard > Gboard > Text correction > Spell check and flick the toggle into the desired position.


1 Answers

Set this in your layout's xml for your EditText:

android:inputType="textNoSuggestions"

Or call setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS) in your Activity'

If you need to support API 4 and below, use android:inputType="textFilter"

like image 83
CrackerJack9 Avatar answered Oct 11 '22 13:10

CrackerJack9