简体   繁体   English

完全禁用phonegap应用程序上的android键盘

[英]Completely disable android keyboard on phonegap application

Hello Stackoverflow Community, 您好Stackoverflow社区,

I am writing Phonegap application, and i need to support Android 2.3 - 4.1. 我正在编写Phonegap应用程序,并且我需要支持Android 2.3-4.1。 On earlier android there are some bugs with keyboard, so I've created custom one on html. 在较早的android上,键盘存在一些错误,因此我在html上创建了自定义错误。 Now, I need for all androids version API <= 10 turn of virtual keyboard. 现在,我需要所有Android版本的API <= 10转虚拟键盘。 Any ideas how to completely programmatically disable it? 任何想法如何完全以编程方式禁用它?

Thanks, -Dima 谢谢-迪玛

put below code in your manifest file, inside actvity node 将以下代码放在清单文件中的actvity节点内

android:configChanges="orientation|keyboardHidden" android:configChanges =“ orientation | keyboardHidden”

it may help you 它可以帮助你

On earlier android there are some bugs with keyboard 在较早的android上,键盘存在一些错误

First, there are many implementations of "virtual keyboards" in use in Android. 首先,Android中使用了许多“虚拟键盘”的实现。

Second, I am not aware that Web developers have generally had problems with Android's soft keyboards. 其次,我不知道Web开发人员通常在Android的软键盘方面遇到问题。 You are welcome to provide links to evidence supporting your claim. 欢迎您提供指向支持您的主张的证据的链接。

Now, I need for all androids version API <= 10 turn of virtual keyboard. 现在,我需要所有Android版本的API <= 10转虚拟键盘。 Any ideas how to completely programmatically disable it? 任何想法如何完全以编程方式禁用它?

That is not possible. 这是不可能的。 However, if your Web page does not have anything that allows conventional text input (eg, <textarea> ), then the soft keyboard typically will not appear on its own. 但是,如果您的网页没有任何允许常规文本输入的内容(例如<textarea> ),则软键盘通常不会单独显示。

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

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