禁用捏放大的WebView? [英] Disable pinch zoom in WebView?
问题描述
我要建一个应用程序,显示一个的WebView一些内容。我这个样式的内容以适合屏幕并没有缩放是必要的。有没有办法不关闭一个web视图的缩放功能?
wv.getSettings()setSupportZoom(假)。
是你想要的。与setBuiltInZoomControls也不会禁用多点触控缩放,但这确实。虽然其值得注意的是,根据设备变焦可能默认被禁用。我与它和我的HTC G2一个web视图的应用程序,它不会让我放大的。但完全相同的code将使缩放的银河平板电脑。
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 features of a WebView?
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.
这篇关于禁用捏放大的WebView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!