关闭 EditText 的自动建议? [英] Turn off autosuggest for EditText?

查看:29
本文介绍了关闭 EditText 的自动建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法以编程方式关闭在您输入 EditText 时弹出的自动建议列表?

Is there a way to programmatically turn off that autosuggest list which pops up as you type in EditText?

推荐答案

我有同样的问题,但我仍然想在我的 XML 文件中设置这个选项,所以我做了更多的研究,直到我自己找到了.

I had the same question but I still wanted to set this option in my XML file so I did a little more research until I found it out myself.

>

将此行添加到您的 EditText 中.

Add this line into your EditText.

android:inputType="textFilter" 

这是一个提示.如果您希望能够使用回车"键,请使用此行.

Here is a Tip. Use this line if you want to be able to use the "enter" key.

android:inputType="textFilter|textMultiLine"

这篇关于关闭 EditText 的自动建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆