开发者

Disable Predictive Text in EditText

开发者 https://www.devze.com 2023-02-11 20:58 出处:网络
I think this is a pretty simply question, but how do I disable the predictive text for an EditText in Android. Do I set a property in the EditText\'s XML or a prope开发者_运维问答rty in the EditText\'

I think this is a pretty simply question, but how do I disable the predictive text for an EditText in Android. Do I set a property in the EditText's XML or a prope开发者_运维问答rty in the EditText's object... or both? Thanks!


You can set the inputType property in the XML layout or call setInputType() with one or more (separated by |) of those values.

To disable the suggestions use text|textNoSuggestions. However the Sense UI keyboard seems to ignore that, adding textFilter works here.

0

精彩评论

暂无评论...
验证码 换一张
取 消