I have an Android Webview where I load HTML into using loadDataWithBaseURL, some of my images are displayed a “?” as if the image is missing. I had trouble fixing that so I’m now attempting to remove images altogether. I tried to use:
webview.loadUrl("javascript:(function() { " + "document.getElementsByTagName('img')[0].style.display = 'none'; " + "})()");
But it didn’t work, I’m struggling to think of another solution. The HTML code producing the images is formatted like so:
<img name="StartDate" src="images/calendar.gif" onclick="displayDatePicker('StartDate',false,'dmy','-')" alt="Press for a date picker" />
Any help would be greatly appreciated.
Try using: