Android: Multiline & No autosuggest in EditText

后端 未结 7 694
既然无缘
既然无缘 2021-01-12 05:09

Is it possible to have an EditText that allows multilines and doesn\'t show the suggestions? I tried with this code:

android:inputType=\"textFilter|textMulti         


        
7条回答
  •  醉酒成梦
    2021-01-12 06:04

    A bit later than the others & the answer has been accepted, but after some testing on various devices, some keyboards ignore textFilter and textNoSuggestion, the only way that I've found to guarantee no keyboard is using textVisiblePassword

    If you want it on a multi-line, you can use:

    android:inputType="textVisiblePassword|textMultiLine"
    

    Note that it has little to do with the API level, but more to do with the keyboard installed - the default Samsung keyboard on slightly older devices, SwiftKey & TouchPal definitely ignore textFilter & textNoSuggestion

    I hope this helps someone else in the future

提交回复
热议问题