为 WebView 文本输入禁用 Android 键盘的“Go"按钮 [英] Disabling Android Keyboard's 'Go' Button for WebView Text Entry

查看:29
本文介绍了为 WebView 文本输入禁用 Android 键盘的“Go"按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Android 应用程序,该应用程序使用指向基于 jQueryMobile 的站点的 WebView.通常,禁用软键盘上的开始"按钮就像将 android:imeOptions="actionDone" 添加到控件的 XML 标记一样简单.然而,在 WebViews 的情况下,这并不能解决问题.

I am developing an Android application that uses a WebView pointed at a jQueryMobile-based site. Normally, disabling the 'Go' button on the soft keyboard is as simple as adding android:imeOptions="actionDone" to the control's XML tag. In the case of WebViews however, this doesn't do the trick.

如何禁用Go"按钮自动提交表单,或者简单地将其替换为Done"按钮,例如 android:imeOptions="actionDone"编辑文本?

How can I disable the 'Go' button from automatically doing a form submission, or alternatively to simply replace it with the 'Done' button, like android:imeOptions="actionDone" would for an EditText?

推荐答案

您可以通过设置表单的 onsubmit 事件来停止提交表单.

You may stop submitting form by putting the onsubmit event of the form.

这篇关于为 WebView 文本输入禁用 Android 键盘的“Go"按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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