The soft keyboard does not push the contents of web pages without resizing

Simply put, after loading content into a webview and clicking on a text field, my application refuses to resize or pan.

Here is my setup

I have one action with multiple fragments. Here's a layout with a container for the fragment.

 <android.support.v4.widget.DrawerLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"      
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent" 
    android:layout_height="match_parent">
    <!-- MAIN CONTENT -->
    <FrameLayout 
       android:id="@+id/container"
       android:layout_width="match_parent"
       android:layout_height="match_parent"   
       android:background="@android:color/white" />

    <RelativeLayout
       android:layout_width="240dp"
       android:layout_height="match_parent"
       android:layout_gravity="start">

       <!-- ... -->
    </RelativeLayout>
</android.support.v4.widget.DrawerLayout>

Here is a fragment of a webview fragment.

<RelativeLayout   
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <include
        android:id="@+id/tbOnlinePayment"
        layout="@layout/toolbar" />

    <WebView
        android:layout_below="@+id/tbOnlinePayment"
        android:id="@+id/paymentWebView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

    <ProgressBar
        android:id="@android:id/progress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"/>

</RelativeLayout>

My extends application theme Theme.AppCompat.Light.DarkActionBar

what i tried :

  • As this is written all over the internet, I've tried both android:windowSoftInputMode="adjustResize"and android:windowSoftInputMode="adjustPan".
  • I know that in full screen android:windowSoftInputMode="adjustResize"it won’t work, but I don’t force it manually. I posted the application theme here because maybe someone knows that this theme somehow forces full-screen mode.
  • , <item name="android:windowFullscreen">false</item> , .
  • webview scrollview.
  • webview wrap_content.
  • SO.

:

, -. , .

+5
1

:

    <activity
        android:name="com.myapp.MainActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">

AdjustResize .

+1

All Articles