4

I'm using InAppBrowser cordova plugin to make a webview from my website. It's working properly, but two zoom buttons appears when I start to scroll my webpage. How do I hide it ? I'm using it to open the webview:

var ref = window.open("http://m.estadao.com.br", "_self", "location=no", "closebuttoncaption=Return", "EnableViewPortScale=no");

zoom

Tks!

vbotio
  • 1,566
  • 3
  • 26
  • 53

3 Answers3

4

You can pass zoom attribute with value no as an option when using InAppBrowser.

var ref = window.open("http://m.estadao.com.br", "_self", "location=no","zoom=no", "closebuttoncaption=Return", "EnableViewPortScale=no");

Source - Cordova InAppBrowser github documentation.

0_0
  • 537
  • 1
  • 7
  • 20
  • It doesnt work at all. It just disable the zoom but it doesnt hide the zoom buttons. – vbotio Jul 27 '15 at 19:24
  • Unfortunately its not possible. Not supported by Android native api. You can only disable them. Also, keep in mind once you disable zoom controls, user won't be able to pinch and zoom. Source - [Google Android API Doc](http://developer.android.com/reference/android/webkit/WebSettings.html#setBuiltInZoomControls%28boolean%29) – 0_0 Jul 28 '15 at 01:32
2

The zoom attribute will work if used like this:

var ref = window.open("http://m.estadao.com.br", "_self", "location=no,zoom=no");

Moreover, one can edit the zoomControls in the InAppBrowser.java present in plugins/cordova-plugin-inappbrowser/src/android

0

Try this

var ref = window.open("http://m.estadao.com.br", "_self", {location:"no","zoom=no"});
4b0
  • 21,981
  • 30
  • 95
  • 142
koFTT
  • 78
  • 5