I have programmed Android since 2.1 but I really don't know how the WebView decides on the sizing of Html elements like text and images, that it is rendering. I am loading my HTML as follows:
String displayHtml = "<html><header></header><body>"+someDivContent + "</body></html>";
webView.loadData(displayHtml, "text/html; charset=utf-8", "UTF-8");
So everything renders fine, except for one thing. The text is so small I can barely read it. Essentially I use my fingers to zoom out and then everything looks perfect, but what I don't get is why the webview defaults to something that is so unreadable? And how can I know programatically how much zooming out I need to do? Its as if the webview does not know it can scroll or something so tries to fit everthing into the visible area of the screen and so shrinks everything. The font size is not a reasonable default, nor is the zoom. And its not just the font size, the images are also shrinked. That's my question, I will soon post the exact html data, but I get this almost everything I load from a string. I almost never get it when I load via url.
UPDATE: This question is not: How do I zoom like others answered before. The question is given dynamic HTML how do I know if I need to zoom at all? And by how much?
Thanks in advance!