webviews don't word wrap correctly on Android?

I’m using a WebView to display our game instructions and credits, which works fine on iOS. However, on Android, it doesn’t word wrap correctly, leaving about half of the available window empty (the text is on the left, and there is empty space on the right). If I zoom in using pinch zoom, the text fills up the window, so I know I’ve allocated my WebView to the right boundaries, its just not word wrapping correctly. Any ideas how to get the web page to display with in the boundaries of the Android device? [import]uid: 122310 topic_id: 35284 reply_id: 335284[/import]

This won’t work for everyone, but it solved the problem for me since I’m just using the webview to show instructions.

put this in your block

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;">  

I learned it from here: http://www.flynsarmy.com/2011/08/how-to-fix-strange-web-page-widths-on-android-browser/ [import]uid: 122310 topic_id: 35284 reply_id: 140930[/import]

This won’t work for everyone, but it solved the problem for me since I’m just using the webview to show instructions.

put this in your block

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;">  

I learned it from here: http://www.flynsarmy.com/2011/08/how-to-fix-strange-web-page-widths-on-android-browser/ [import]uid: 122310 topic_id: 35284 reply_id: 140930[/import]

Thanks!

I just had the experience that on my Android Nexus 7 tablet the word wrapping worked fine, but on a smartphone (Galaxy S3) it would wrap to a third of the actual available size.

The meta tags did the trick to solve it. Thanks again.

Thanks!

I just had the experience that on my Android Nexus 7 tablet the word wrapping worked fine, but on a smartphone (Galaxy S3) it would wrap to a third of the actual available size.

The meta tags did the trick to solve it. Thanks again.