Android的软键盘会隐藏无缘无故无缘无故、键盘、Android

由网友(愚蠢至极)分享简介:我有以下问题 - 我已经把I'm having the following issue - I have placedandroid:windowSoftInputMode = "stateAlwaysVisible"在我的清单中,因为软件键盘的几乎总是可见它的工作原理比较精细。我有一个web视图中,我有一个可编辑...

我有以下问题 - 我已经把

I'm having the following issue - I have placed

android:windowSoftInputMode = "stateAlwaysVisible"

在我的清单中,因为软件键盘的几乎总是可见它的工作原理比较精细。我有一个web视图中,我有一个可编辑的div中,用户可以输入文本。然而,当用户输入一些文字和水龙头其他地方上的web视图(从当前光标所在位置不同的位置)软键盘会隐藏了一会儿,之后重新出现。我在我束手无策,无法找到此解释。使用InputMethodManager使键盘总是可见也没有帮助。

in my manifest which works relatively fine since the software keyboard is almost always visible. I have a webview in which I have an editable div in which the user can enter text. However when the user have entered some text and taps somewhere else on the webview(on a position different from the current cursor position) the software keyboard will hide for a moment and afterwards reappear. I'm at my wits end and can't find an explanation for this. Using InputMethodManager to make the keyboard always visible also didn't help.

任何帮助将大大appereciated。谢谢!

Any help will be greatly appereciated. Thanks!

推荐答案

问题是,键盘是隐藏由于这样的事实,我们是通过通过所有的触摸事件下的JavaScript我们有使用loadURL(JavaScript的:巴(event.getX(),event.getY()));

The issue was that the keyboard is hiding due to the fact that we were passing all the touch events down to javascript we are having via loadUrl("javascript : bar(event.getX(), event.getY()));".

原来,使用loadURL 方法在内部隐藏软键盘。我曾围绕这个由没有通过触摸事件的JavaScript,而是由使用 window.onmousemove

Turns out the loadUrl method internally hides the software keyboard. I worked this around by not passing the touch events to the javascript, but instead by using window.onmousemove

阅读全文

相关推荐

最新文章