Android programmatically disable autocomplete/autosuggest for EditText in emulator

后端 未结 12 527
鱼传尺愫
鱼传尺愫 2020-12-03 02:37

Targeting Android 2.2

I have read the answers to the following questions:

Turn off autosuggest for EditText?

Android: Multiline & No autosuggest

12条回答
  •  不思量自难忘°
    2020-12-03 03:13

    In the layout XML, add the following attribute to your EditText:

    android:inputType="text|textNoSuggestions"
    

    If neither this, nor the above approaches work, then this is almost certainly a problem with the emulator and the other device, and you should contact the manufacturers directly.

    See also: android:inputType (note that EditText is a subclass of TextView, which is why this attribute also works for EditTexts).

提交回复
热议问题