Question

Im looking for a way to disable autocorrection in EditText (and optionally to live autosuggestions). Current code:

<EditText
    android:id="@+id/text_message_edit_text"
    android:layout_width="240dp"
    android:layout_height="wrap_content"
    android:ems="10"
    android:inputType="textCapSentences|textMultiLine|textNoSuggestions|textFilter"
    android:textSize="20sp" />

I have tried this solution adding textVisiblePasswordattribute. It helped me, but after this button for language switch become disabled.

Was it helpful?

Solution

Is there a 100% way? No. Every keyboard application interprets the inputTypes a little differently, and not all of them honor all input types. So there is no universal way to insure no auto corrects. Visible password is the best way since almost all keyboards honor it for security reasons. Filter and no suggestions are also common flags to do it, but you have those. You're doing everything you can I'm afraid- that keyboard just is ignoring you and showing it no matter what.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top