文本框下面隐藏键盘的Andr​​oid的WebView [英] Textbox hidden below keyboard in Android webview

查看:144
本文介绍了文本框下面隐藏键盘的Andr​​oid的WebView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的iPhone / Android应用程序,包含一个正常的WebView。该web视图调用我的网站。

I have created a simple iPhone/Android app, containing a normal webview. This webview calls my website.

在我的网站上有几种形式与输入类型=文本或文本区域。我有与这些问题时,他们是在页面底部!

On my website there are several forms with input type=text or textarea. I have a problem with those when they are at the bottom of the page!

1)在我的iPhone应用程序时,键盘会自动出现,推动了文本框到手机屏幕的可视面积。所以没有什么可以做的。

1) In my iPhone app, the keyboard will automatically appear and push the textbox to the visible area of the phone screen. So there is nothing to do.

2)但在我的Andr​​oid应用程序的文本框会留在同一个地方,最终被隐藏在我的键盘。所以,唯一的选择,用户必须是键入盲点。

2) But in my Android app the textbox will stay at the same place and is eventually hidden by my keyboard. So the only option users have is to type "blind".

我该如何解决这个问题?有没有其他人遇到这个问题?

How can I fix this? Did anyone else meet this problem?

推荐答案

这是我如何解决这个问题。正如Venky说,你必须添加

This is how I solved the problem. As Venky said, you have to add

android:windowSoftInputMode="adjustResize"

您在AndroidManifest.xml文件中的标记。但在我们的情况下,这是不够的。确保你做到这一点,以及你的看法,webviews等。然后,我们终于有了它的工作。

to your tag in the AndroidManifest.xml file. But in our case, it wasn't enough. Make sure you do this as well with your views, webviews etc. Then we finally made it work.

这篇关于文本框下面隐藏键盘的Andr​​oid的WebView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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