[英]Android soft keyboard under webview
I have full width & full height webview (with a formular). 我有全宽和全高的webview(带有公式)。 What I need is after focusing input open soft keyboard, but UNDER webview, so the webview should automatically scroll up.
我需要的是在聚焦输入后打开软键盘,但是在webview下,因此webview应该自动向上滚动。
I tried android:windowSoftInputMode but it doesn't work. 我尝试了android:windowSoftInputMode,但是它不起作用。
Manifest: 表现:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sk.eworkperform"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name="sk.eworkperform.activity.WebBrowserActivity" android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="sk.eworkperform.activity.AdminActivity" >
</activity>
<activity android:name="com.dm.zbar.android.scanner.ZBarScannerActivity" >
</activity>
</application>
Webview layout: Webview布局:
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Thank you 谢谢
try this on your xml(in the root) which include web view 试试这个在您的XML(在根)包括网络视图
android:fitsSystemWindows="true"
if it doesn't work try this as well in your menifest in that activity 如果不起作用,请在该活动的清单中尽量尝试一下
<activity
android:name="com.YourActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.