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?
Is there a particular way to pass the HTML resource to a WebView
?
Thanks!
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");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With