如何将缩放控件设置为自定义按钮?
我有一个 UI,其中有一个 WebView 和其顶部的两个按钮。比如说,我想为这两个按钮设置缩放控件,即一个用于放大,另一个用于缩小。
我该怎么做?我知道 WebView 和 MapView 确实有自动缩放控件,但我想将它们设置为我在 UI 中创建的按钮。
有什么帮助吗?
I have an UI in which I am having a WebView and two buttons on top of it.Say,I want to set zooming controls for these two buttons i.e one for zooming in and the other for zooming out.
How will I do this? I know that WebView and MapView do have automatic zoom controls but I want to set them to the buttons which I have created in my UI.
Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在按钮 onClick 侦听器中的
WebView
上调用zoomIn()
和zoomOut()
。Call
zoomIn()
andzoomOut()
on theWebView
in your buttons onClick listeners.