Home » Android » android – Can't type inside a WebView

android – Can't type inside a WebView

Posted by: admin June 15, 2020 Leave a comment


I have a problem interacting with a WebView. I’m showing an HTML login form within a WebView and I can’t type inside of any of the input fields of the forms. I do can interact with the links, select boxes, buttons, etc.

Here is an example of my code. Basically I’m retrieving the web view from the xml and setting it a WebViewClient and a WebChromeClient.

webview = (WebView) findViewById(R.id.loginWebview);

WebViewClient client = new WebViewClient();

webview.setWebChromeClient(new WebChromeClient());

Any ideas?

How to&Answers:

You can do the following to solve this:

WebView webView = (WebView)findViewById(R.id.yourWebView);

There is another post here.