键盘出现时Webview不会调整大小

Abh*_*agi 7 android webview android-softkeyboard cordova

当键盘出现时,需要调整类似于Cordova/Phonegap的webview.现在根据下面的代码,我的输入文本字段被设备键盘覆盖.我想挤压webview的高度,并调整设备键盘上方的高度.

活动代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_home">

<include android:id="@+id/head" layout="@layout/header" />

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginBottom="11dp"
    android:layout_marginLeft="11dp"
    android:layout_marginRight="11dp"
    android:layout_marginTop="2dp"
    android:layout_below="@id/head"
    android:background="@drawable/overlay_bg2"
    android:orientation="vertical"
    android:padding="9dp" >

    <WebView
        android:id="@+id/webView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" 
        android:layout_gravity="center"
        android:isScrollContainer="true"/>

    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyleLargeInverse"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:visibility="invisible" />

</FrameLayout>

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

清单条目:
主题 android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"


活动键盘控制 android:windowSoftInputMode="adjustResize"

The*_*nil 3

据我所知,如果您的活动(或整个应用程序)设置为全屏;android:windowSoftInputMode="adjustResize"不起作用。