Webview Android Does Not Wrap The Text
I've searched the Internet for a solution but I can't find it. I have a WebView that display text, Just text. I want to wrap the text in the WebView, is that possible, or what? And
Solution 1:
I found the solution. You have to add some div tag on your web document, and then add a css class. I did this:
<div class="wrap">
with a css class like this:
.wrap {
word-wrap:break-word;
}
Solution 2:
If the content in the WebView is something that you yourself have created or have control of, use a stylesheet optimized for mobile devices, or you can use jTouch or jQuery Mobile
Solution 3:
If your content is literally plain text (no HTML markup), then the WebView will be treating it as preformatted text and won't wrap or insert linebreaks.
Try wrapping your text in an HTML wrapper:
<html><body>My text goes here</body></html>
Post a Comment for "Webview Android Does Not Wrap The Text"