如何打开和关闭键盘编程predictive文本选项 [英] How to turn on and off Predictive text option of keyboard Programmatically

查看:166
本文介绍了如何打开和关闭键盘编程predictive文本选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想打开predictive文本选项活动时创建和关闭时的活动破坏

I just want to turn on Predictive text option when activity created and off when activity destroy

推荐答案

我觉得predictive文字输入是输入对象的参数。所以,当你开始编辑文本时调用输入对象,你可以给它一个参数:正文| textNoSuggestions ,这样键盘就不会显示该建议。

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.

setInputType(text|textNoSuggestions)

这篇关于如何打开和关闭键盘编程predictive文本选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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