0

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.

4

1 回答 1

2

有100%的方法吗?不,每个键盘应用程序对 inputTypes 的解释都略有不同,并且并非所有键盘应用程序都支持所有输入类型。因此,没有通用的方法来确保不会自动更正。可见密码是最好的方法,因为出于安全原因,几乎所有键盘都尊重它。过滤和没有建议也是常见的标志,但你有这些。恐怕你正在尽你所能 - 键盘只是无视你并无论如何都显示它。

于 2013-05-24T14:45:10.150 回答