Lets say you want to store your HTML files in /res/string
, then you can use language qualifiers to specify for which language the resources is meant, like /res/string-en
or /res/string-nl
(for English respectively Dutch files).
Same goes for all other resource types, like /res/drawable
, /res/raw/
, etc.
For more information checkout the Android Localization pages.
To load the HTML from a string and show it in your WebView
use the loadData()
method:
html = resources.getString(R.string.my_html_page);
myWebView.loadData(html, "text/html", myEncoding);