0

i want to populate a List in an HTML5 File (displayed within a WebView) with data from Android Code (for exmaple from an ArrayList). Can anyone please tell me how or if this is possible.

Thanks in advance Thommy

2 Answers 2

1

With a WebView you can simply:

webview.loadUrl("javascript:YOURJAVASCRIPTCODE");

Your javascript code could be something like:

document.getElementById('txtField1').value = "test";
Sign up to request clarification or add additional context in comments.

Comments

1

Read this:

http://developer.android.com/guide/webapps/webview.html#BindingJavaScript

You can expose anything from your Android code. If you return some JSON (array or object), you can build your list (or anything else) using some javascript.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.