我正在尝试显示看起来像这样的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>
我正在从像这样的字符串中加载我的html
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();
}
adviceWebView - 是我想要显示html的WebView
所以问题是 - 如何从我的所有html文件预加载图像(我可以获取链接并下载它们),但我需要保存它们所以带链接的图像
http://srv100443.hoster-test.ru/Autohelper/wp-content/uploads/2014/01/benzin.jpg
显示在本地cashe(或文件)中。无论如何要做到这一点,而不改变HTML中的链接?
我可以手动将文件放在我的IDE中吗?或者应该放在哪里?