Webview to scroll up when keyboard appear not working as desired

16 Views Asked by At

I have a webView which loads a link data having multiple input fields and a button at the bottom(the link I am using is third party and they can't make changes at their end). The issue is whenever keyboard appears the button which is at the bottom get placed above the keyboard covering the last textField. When I open the same link in the chrome on opening of keyboard whole data of the page scrolls up making enough space so that all content is visible.I searched a lot and tried different solutions but nothing is working out for me. What I want is when keyboard appears whole webview scrolls up, not only the button above the keyboard. This is what I am doing

<activity
            android:name="com.Lyber.ui.activities.WebViewActivity"
            android:exported="true"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize|stateVisible"
            tools:ignore="LockedOrientationActivity" />

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

    <WebView
        android:id="@+id/webView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
</LinearLayout>```
I tried adjust pan, keeping webView inside scrollview/nestedScrollView nothing is working for me[![This is what I am getting on the screen][1]][1]


[![This is what I want][2]][2]


  [1]: https://i.stack.imgur.com/WcoQH.png
  [2]: https://i.stack.imgur.com/SoLAn.png
0

There are 0 best solutions below