我想一个HTML资源添加到我的Android项目,引用其他资源(主要是可绘制)。
I would like to add an HTML resource to my Android project with references to other resources (mainly drawables).
我应该在哪里把它和我怎么引用其他资源呢?
Where should I put it and how do I reference other resources from it?
有没有传递HTML资源到的WebView一种特殊的方式
?
Is there a particular way to pass the HTML resource to a WebView
?
谢谢!
HTML文件进入根的资产文件夹(如水库的兄弟文件夹),以及所有的可绘制。你可以做这样的事情
The html file goes into the assets folder in root (as a sibling folder of res), as well as all the drawables. You can view it by doing something like
webView.loadUrl("file:///android_asset/filename.html");
上一篇:冲突内容提供商提供商、冲突、内容