javascript - Set html text field value from java interface android -


I'm working on a project where I have to set values ​​in HTML form fields of your Java method. When the form loads in this app, I have to fill in the text field value on the user's speech. So how can I do this via the Javascript interface in Android? Thank you

The main Gtividhikjawa

  WebView.loadUrl ("Your URL"); WebViewksetWebViewClient (new WebViewClient () {@Override public void onPageFinished (webview scene, String url) {webView.loadUrl ( "javascript: setTextField (" + value + ")"}} @ Override public boolean Chahiaovrraiduarelloding (Vebviv view, string URL) {view.loadUrl (url); right back;}});   

HtmlFile.html

  & lt ; script & gt; function setTextField (value) value = value {document.getElementById ( "texta").;} & Lt; / script & gt;    

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -