更改WebView的android输入法
我有一个 WebView,它加载带有表单的网页,并且希望使用最基本的键盘,以便在使用屏幕键盘作为输入法时节省屏幕空间。我还想禁用屏幕键盘中的单词建议等功能。这可能吗?
I have a WebView that loads a webpage with a form and would like to use the most basic keyboard possible in order to conserve screen real estate if they are using the onscreen keyboard as their input method. I would also like to disable things like word suggestions in the onscreen keyboard. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法在任何地方更改输入法——只有用户可以更改其输入法。
在禁用搜索建议方面,我没有看到任何钩子来改变从
WebView
公开的行为,抱歉。You cannot change the input method, anywhere -- only users can change their input method.
In terms of disabling search suggestions, I haven't seen any hooks to change that behavior that are exposed from
WebView
, sorry.我认为您可以向 HTMl 组件添加一些属性来实现您想要的功能。
这适用于我测试过的 Android 设备(三星 Galaxy 4 和 Nexus 7),但如果这不适用于其他设备,我也不会感到惊讶。
I think you can add some attributes to the HTMl component that will make what you want.
This works in the Android devices I have tested (Samsung Galaxy 4 and Nexus 7), but I would not be surprised if this does not work in other devices.