I created my own WebView and set the WebChromeClient and WebViewClient objects. When I start this WebView, the HTML form fields react when I touch them (a cursor appears), but they do not get selected, nor does the soft keyboard start. If I use the trackball to choose the form and press it, the keyboard does appear.
I tried to call myWebview.requestFocusFromTouch()
as this answer suggested, but it returns false and doesn't help.
The soft keyboard (also called the onscreen keyboard) is the main input method on Android devices, and almost every Android developer needs to work with this component at some point.
You might often face issues in updating the chrome and Android System Webview. To fix this problem, you can reboot your device, check your internet connection, stop auto-updating all apps, clear Google Playstore cache, and storage, leave the beta testing program, and manually update Android WebView app from Playstore.
http://code.google.com/p/android/issues/detail?id=7189
Here is a fix in case other were not clear.
webview.requestFocus(View.FOCUS_DOWN); webview.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_UP: if (!v.hasFocus()) { v.requestFocus(); } break; } return false; } });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With