Center Vertical WebView Content In Android

So you have a small content that when zoomed out in a WebView, you want it to be placed at the center of the screen vertically all the time. No CSS or Javascript code can make this work as I learned the hard way.

The solution that worked for me was to set the height of the WebView widget to wrap_content. Then aligning it in the middle vertically.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *