Android WebView图像存储,预加载
我正在尝试显示如下所示的htmlAndroid WebView图像存储,预加载,android,image-processing,webview,download,local-storage,Android,Image Processing,Webview,Download,Local Storage,我正在尝试显示如下所示的html <img class="alignnone size-full wp-image-9" alt="benzin" src="http://srv100443.hoster-test.ru/Autohelper/wp-content/uploads/2014/01/benzin.jpg" width="250" height="188" /> <h2>Симптомы:</h2> adviceWebView-是我要显
<img class="alignnone size-full wp-image-9" alt="benzin" src="http://srv100443.hoster-test.ru/Autohelper/wp-content/uploads/2014/01/benzin.jpg" width="250" height="188" />
<h2>Симптомы:</h2>
adviceWebView-是我要显示html的Web视图
所以问题是-如何从我所有的html文件中预加载图像(我可以获得链接并下载它们),但我需要将它们保存在哪里,以便使用链接保存图像http://srv100443.hoster-test.ru/Autohelper/wp-content/uploads/2014/01/benzin.jpg
显示在本地现金(或文件)中。在不改变html中的链接的情况下,有没有其他方法可以做到这一点?
我可以手动将文件放在IDE中以进行评估吗?或者它们应该放在哪里
private void loadHtmlPage() {
String htmlString = getHtmlFromAsset();
if (htmlString != null)
adviceWebView.loadDataWithBaseURL("file:///android_asset/images/", htmlString, "text/html", "UTF-8", null);
else
Toast.makeText(this, "No such page", Toast.LENGTH_LONG).show();
}