【发布时间】:2017-07-05 02:39:14
【问题描述】:
我正在尝试将存储在数据库中的包含图像的 html 字符串加载到WebView 中。图像存储在内部存储器中。我给出了对 html 字符串的引用。但它不起作用。有什么帮助吗?
String content="<p>Can we have a rotational" +
" symmetry of order more than 1 whose angle of rotation is </p>\n" +
"\n <p>(i) <img alt=\"45\\degree\" src=\"file:///storage/emulated/01484890695248.jpg\" /></p>\n" +
"\n<p>(ii) <img alt=\"35\\degree\" src=\"file:///storage/emulated/01484890697301.jpg\" /></p>";
WebView00.loadDataWithBaseURL("", content, "text/html","UTF-8", "");
WebView00.getSettings();
【问题讨论】:
-
您是否添加了读取权限?以及 API>23 的运行时权限