g123k g123k - 1 year ago 154
HTML Question

Android webview : dezoom to fit content

I have an html content with a mandatory fixed size (let's say 500px).
If the screen is large enough, I center the content.

However, if the width is less than 500px, I have to unzoom to have all the content. I guess I have to change the viewport in the html, but all my tries have failed.

Note: In every case, the user can zoom.

Do you have an idea how to achieve this?

Answer Source

The solution I have used is simply to call this method :


When the scale is 100, it means no zoom.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download