禁用多行 EditText 中的建议
如何禁用多行 EditText 中的自动更正/自动建议功能?
我尝试过:
<一href="https://stackoverflow.com/questions/7022581/how-to-set-multiline-firstletter-caps-and-disable-suggestions-on-edittext">如何设置多行、首字母大写并禁用编辑文本建议
提到的方法(如“textFilter|textMultiLine|textNoSuggestions”(任何组合))都不起作用,既没有在 XML 中声明,也没有以编程方式进行更改。 看来 EditText 框要么接受多行建议,要么接受关闭建议,但不能同时接受两者。
我认为了解我使用的是 Android 2.3.3 的 HTC Desire HD 非常重要。我没有任何其他设备来测试这个。
此行为是 HTC Sense UI 固有的吗?
有什么想法吗?
How do you disable the autocorrection/autosuggestion features in a multilined EditText?
I tried:
EditText without auto-correction, etc
Android: Multiline & No autosuggest in EditText
How can I turnoff suggestions in EditText?
How to set multiline,firstletter caps and disable suggestions on edittext
How can I turnoff suggestions in EditText?
None of the mentioned methods like "textFilter|textMultiLine|textNoSuggestions" (in any combination) worked, neither declared in XML nor programmatically changed.
It seems that the EditText-box takes either multiline or turned-off suggestions, but not both at the same time.
I think it is important to know that I'm using the HTC Desire HD with Android 2.3.3. I don't have any other device to test this.
Is this behaviour inherent to the HTC Sense UI?
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在
EditText
中为 MultiLine 和 NoSuggestions 指定的inputType
标记是系统可以忽略的标志,具体取决于就其喜好而言。但是,我可以确认 EditText XML 中的
android:inputType="textNoSuggestions|textMultiLine"
在 Nexus 和 Motorola 智能手机中工作得很好。因此,我猜测您面临此问题是由于您的测试设备偏好所致。The
inputType
tag that you specify inEditText
for MultiLine and NoSuggestions are flags that can be ignored by the system depending on its preferences.But, I can confirm that
android:inputType="textNoSuggestions|textMultiLine"
in the EditText XML works perfectly fine in Nexus and Motorola smartphones. So am guessing its due to your test device preferences that you are facing this problem.