androidandroid-webviewandroid-webview-javascript

Update content in WebView on loading start in runtime


I need add same content on webview after loading start. For example, if I have web page:

<head>
</head>
<body>
</body>

I need get

<same content/>
<head>
<head>
<body>
</body>

but <same content/> must be loaded before <head> Do you have any ideas?


Solution

  • It is possible by overwrite methods loadData and loadDataWithBaseURL