Is there a way to use HTML kept in the device storage as we do for XML in the package?
Asked
Active
Viewed 40 times
1 Answers
0
If you need to use this HTML again and again then it would be better if you store that html file in assets folder and render in web view from there like this
WebView view = new WebView(this);
view.getSettings().setJavaScriptEnabled(true);
view.loadUrl("file:///android_asset/hello.html");
setContentView(view);

Ahmad Ayyaz
- 774
- 8
- 25
-
Thanks! But how to render it? – Ed UK Apr 18 '18 at 18:54
-
I have edited my answer – Ahmad Ayyaz Apr 19 '18 at 05:41