我有一个包含大量文本和基本 html 标记的 html 文件。该文件位于res/raw文件夹中。但是,当我尝试从我的 webview 显示这个 html 时,</br
> 不工作,虽然<b></b>
很好。我的最小 SDK 是 8,目标 SDK 是 15。
这是屏幕截图:
这是html文件:
<!DOCTYPE HTML>
<article align="center">
Printf(“Hello World ^_^”);</br></br>
<b>This section will explain about the objective of this apps.</b></br>
This apps is designed for those who want to learn Computer Science (programming), with no experience necessary (so you don’t have to worry about your age, background, education, etc. EVERYONE can learn programming!).</br>
This apps will teach you about the basics of the programming using C languange.</br>
</article>
这是网络视图代码:
webChapter.loadUrl("file:///android_res/raw/hello_world.html");
我试过这个,但没有运气,文件甚至无法读取:
webChapter.loadDataWithBaseURL("file:///android_res/raw/", "hello_world.html", "text/html", "UT-8", "");
感谢:D