I have a collection of html pages stored as Strings in my android application. Imagine it like this: List<String> myWebPages
, where each String represents an html page containing css and javascript within the html body. What would be the most effective way to present these web pages to the user? Should I opt for a WebView or utilize a TextView instead? It's worth noting that I do not possess URLs for the WebView; how can I pass the String data? And regarding the TextView, is it capable of handling complete web pages with css and javascript?
Update
Whenever I use
webView.loadData(Html.fromHtml(value).toString(), "text/html", "UTF-8");
my code ends up jumbled and unreadable; it seems incapable of properly interpreting the css, etc.
For reference, here is a snippet of my html code (as a template):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
... (the rest of the HTML code) ...
</body>
</html>
Just a heads up, I am not a professional web developer so the provided html stands as my best attempt (feel free to point out any mistakes).