WebView textarea doesn't pop up the keyboard

前端 未结 11 1967
野趣味
野趣味 2020-11-28 06:06

When I display a WebView, I don\'t see the soft keyboard popping up. The hard keyboard also doesn\'t work!

What are the usual shortcomings.

The

11条回答
  •  借酒劲吻你
    2020-11-28 06:57

    I was having the exact same problem none of the above solutions worked for me. After ages of trying i finally found the problem.

    Some of the various web pages I was rendering with WebView didn't fit properly into the Web view and as a result a div (or some other html component ) were being invisibly laid over the input fields. Although the input fields appeared selected when touched, they would not allow text input (even if i did manage to get the soft keyboard up using the track ball).

    So the solution.

    WebView.getSettings().setUseWideViewPort(true);
    

    This won't completely stop the issue, but makes the view more like a PC browser which sites are designed for. Less change of the overlay.

    Hope this helps you.

提交回复
热议问题