WebView doesn't scroll when keyboard opened

后端 未结 3 1651
离开以前
离开以前 2020-12-19 05:55

I have a WebView that contains an input form. When the user selects the first input the keyboard appears and will scroll the WebView so that the input is uncovered. My probl

相关标签:
3条回答
  • 2020-12-19 06:07

    You need to add android:windowSoftInputMode="adjustResize" to your WebView tag in layout xml.

    0 讨论(0)
  • 2020-12-19 06:10

    You need to add:

    android:fitsSystemWindows="true"
    

    to you root of the layout file for the fragment/activity as well as:

    android:windowSoftInputMode="adjustResize"
    

    to you activity in the manifest.

    0 讨论(0)
  • 2020-12-19 06:11

    Check these answers:

    Android webview scrolling doesn't work

    Android Froyo WebView doesn't scroll vertically

    Also, you can check version combatibility

    0 讨论(0)
提交回复
热议问题