Android - how to block zoom

  • 1
  • Question
  • Updated 9 years ago
  • Answered
I am trying to block pinch-to-zoom feature on android.
Google said to use the meta-tag: but it does not work.

It would be great if there was an event function that was called when the user tried to scale. Also if it were read/writable ... possibilities.
Photo of silverhawk184

silverhawk184

  • 21 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of robNeo

robNeo

  • 54 Posts
  • 1 Reply Like
Following meta tag works for me on Android if that helps:

&ltmeta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" /&gt
Photo of silverhawk184

silverhawk184

  • 21 Posts
  • 0 Reply Likes
Here is my setup:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>
<LINK REL=StyleSheet HREF="styles.css" TYPE="text/css" MEDIA=screen>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head>
<body bgcolor=white>
...
</body>
</html>
Photo of robNeo

robNeo

  • 54 Posts
  • 1 Reply Like
Try closing the meta tag - thats the only thing I can see
Photo of silverhawk184

silverhawk184

  • 21 Posts
  • 0 Reply Likes
Did not work, do you have any more ideas?