gpt4 book ai didi

android - Android Jellybean (PhoneGap) 上的空白键盘输入?

转载 作者:行者123 更新时间:2023-11-29 02:02:05 25 4
gpt4 key购买 nike

Jellybean 键盘有一个奇怪的问题。当我的用户升级他们的操作系统时,每当他们尝试使用键盘输入数据时,它就是无法输入。期间。

这很奇怪,因为您确实可以专注于文本区域,但在键盘上打字却没有输出。

有人知道修复方法吗?更具体地说,我的平台是 PhoneGap 1.9.0,项目中没有任何其他原始 java 文件,我的应用程序 list 如下:

<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden|screenSize">
<activity
android:name=".App"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

我的 onCreate 非常简单,如下所示:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("loadUrlTimeoutValue", 60000);
super.loadUrl("file:///android_asset/www/index.html");
this.appView.setInitialScale(100);
}

这是 Sencha Touch 2 生成的表单的源代码:

config: {
padding: 20,
items: [
{
xtype: 'image',
src: 'resources/img/logo-splash.png',
width:250,
height: 229,
baseCls: 'login-splash'
},
{
xtype: 'fieldset',
defaults: {
required: true,
labelAlign: 'left',
labelWidth: '35%'
},
items: [
{
xtype: 'emailfield',
name : 'email',
label: 'Email',
clearIcon: true
}, {
xtype: 'passwordfield',
name : 'password',
label: 'Password',
clearIcon: true
}],

},
{
xtype: 'button',
text: 'Login',
ui: 'action',
id: 'loginBtn',
baseCls: 'btn-orange ui-rd'
}
]
},

然后是 Sencha 的最终 HTML 输出(在 webkit 浏览器上查看):

<div class="x-inner x-form-fieldset-inner" id="ext-element-129"><div class="x-container x-field-text x-field x-label-align-left x-field-required x-field-labeled x-form-label-nowrap x-empty" id="ext-emailfield-1"><div class="x-form-label" id="ext-element-131" style="width: 35% !important; "><span id="ext-element-132">Email</span></div><div class="x-component-outer" id="ext-element-130"><div id="ext-input-1" class="x-field-input"><input id="ext-element-133" class="x-input-el x-form-field x-input-email" type="email" autocapitalize="off" name="email"><div class="x-clear-icon" id="ext-element-135"></div><div class="x-field-mask" id="ext-element-134"></div></div></div></div><div class="x-container x-field-text x-field x-label-align-left x-field-required x-field-labeled x-form-label-nowrap x-empty" id="ext-passwordfield-1"><div class="x-form-label" id="ext-element-137" style="width: 35% !important; "><span id="ext-element-138">Password</span></div><div class="x-component-outer" id="ext-element-136"><div class="x-field-input" id="ext-input-2"><input class="x-input-el x-form-field x-input-password" type="password" id="ext-element-139" autocapitalize="off" name="password"><div class="x-clear-icon" id="ext-element-141"></div><div class="x-field-mask" id="ext-element-140"></div></div></div></div></div>

谢谢!

澄清一下:问题恰恰是当字段聚焦时弹出键盘,但是当您按下键时它不会填写文本

最佳答案

我通过将 PhoneGap 从 1.9.0 升级到 2.0.0 解决了这个问题。

我不确定确切原因是什么,但我也在这里向社区发帖:http://community.phonegap.com/nitobi/topics/blank_keyboard_input_on_android_jellybean

我的直觉是它与 Cordova 处理 Javascript 事件和键盘事件的方式有关。但尽管如此,它现在仍然有效。

关于android - Android Jellybean (PhoneGap) 上的空白键盘输入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12115227/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com