WebView 中不可见的缩放控件
我想要在 WebView 中进行捏合缩放,但我不希望它具有集成控件(小的放大和缩小按钮),我想要的只是捏合缩放。
我尝试了这个,但没有成功:
wv1.getSettings().setBuiltInZoomControls(false);
wv1.getSettings().setSupportZoom(true);
任何想法都会很棒!
ps我使用的是API版本8
I want pinch-to-zoom in WebView but I dont want it to have the integrated control (the little zoom in and zoom out buttons) all I want is the pinch to zoom.
I tried this and it didn't work:
wv1.getSettings().setBuiltInZoomControls(false);
wv1.getSettings().setSupportZoom(true);
Any ideas would be great!
p.s. I'm using API Version 8
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 API 11 或更高版本上,您可以使用:
从 API 11 开始,
设置是否使用屏幕缩放按钮。启用内置缩放控件和禁用屏幕缩放控件的组合允许在没有屏幕控件的情况下进行捏合缩放。
请参阅 在 Android WebView 中启用/禁用缩放。
On API 11 or greater, you can use:
From API 11,
Sets whether the on screen zoom buttons are used. A combination of built in zoom controls enabled and on screen zoom controls disabled allows for pinch to zoom to work without the on screen controls
Look at enable/disable zoom in Android WebView.