[WebView] How to display local images from a remotely loaded URL web page?

1,pages loaded by loadUrl() method do not load images linked with file:///android_asset/... but you can fetch the HTML page using org.apache.http.client.methods.HttpGet.HttpGet() and then pass it to the WebView with loadDataWithBaseURL() - that way WebView will load resources linked with file:///android_asset/...,


2,

You could use base64 embedded images in your page content (no need to struggle with links to restricted filesystem)

<img src="data:image/jpg;base64,xxxxxxxxx"/>

你可能感兴趣的:([WebView] How to display local images from a remotely loaded URL web page?)