user1248568
user1248568

Reputation: 621

Android 4.0+ EditText disable autocorrection

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.

Upvotes: 0

Views: 708

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93561

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.

Upvotes: 2

Related Questions