简体   繁体   English

如何以编程方式打开和关闭键盘的Predictive文本选项

[英]How to turn on and off Predictive text option of keyboard Programmatically

我只是想在活动创建时打开Predictive文本选项,在活动销毁时关闭

I think predictive text input is a parameter of a input object. 我认为预测文本输入是输入对象的参数。 So when you invoke an input object when starting to edit a text, you can give it a parameter : text|textNoSuggestions , so the keyboard will not display the suggestions. 因此,当您在开始编辑文本时调用输入对象时,可以为其指定一个参数: text|textNoSuggestions ,因此键盘不会显示建议。

setInputType(text|textNoSuggestions)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM