没有自动更正编辑文本文本、编辑

2023-09-05 02:03:42 作者:夜未央い落雪成殇

我想没有自动校正一个EditText。 我已经设置了textNoSuggestions inputType,如下所示:

I want an EditText without the autocorrection. I have set the textNoSuggestions inputType, as shown:

 <EditText
    android:id="@+id/txtTarga"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    android:ems="10"
    android:hint="Targa"
    android:inputType="textNoSuggestions|textCapCharacters" >

在利用标志的作品,但它仍然是autocorrecting。

The capitalize flag works, but it is still autocorrecting.

如何禁用呢?

推荐答案

inputType textVisiblePassword会做的伎俩(大部分的时间,因为作为Commonsware指出,它一直是一个要求,你会可能会发现自己查找设备的地方工程和设备的地方它不工作)

inputType textVisiblePassword will do the trick (most of the times, because as Commonsware pointed out, it stays a request and you'll might find yourself finding devices where it works, and devices where it doesn't work)