Disable pinch zoom in WebView?

前端 未结 2 1038
盖世英雄少女心
盖世英雄少女心 2021-01-08 00:42

I\'m building an app that displays some content in a WebView. I\'m styling this content to fit the screen and no zooming is needed. Is there a way do turn off the zooming fe

2条回答
  •  温柔的废话
    2021-01-08 01:18

    wv.getSettings().setSupportZoom(false);
    

    Is what you want. with setBuiltInZoomControls it won't disable multitouch zooming but this does. Although its worth noting that depending on the device zooming may be disabled by default. I have an app with a WebView in it and on my HTC g2 it doesn't allow me to zoom at all. But the exact same code will allow zooming on Galaxy Tablet.

提交回复
热议问题