Turn off / disable Android webview zoom controls

There is an archived post asking about disabling Android zoom controls:

https://forums.coronalabs.com/topic/64938-is-it-possible-to-hide-android-webview-zoom-controls/

I couldn’t reply to that post, so had to create this one.

I just ran into this, and solved it within the HTML of the webview itself.  Here’s the line to add in the head portion of the HTML:

\<html\> \<head\> \<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"\> \</head\> \<body\> Stuff here that you do not want zoomed. \</body\> \</html\>

This only works if you are in control of the HTML - so either a locally served file, or a remote file from your server.  If you’re displaying remote HTML from a 3rd party, you will still need to wait for the webview to be updated.

If you’re adding this, don’t forget to put it in the head section.