Android webview only zoom in
i have a html output, wich is full screen at the start. With the zoom control i can zoom in/out.
I want only zoom in, and not out. So: the minimal zoom out i want is 100% of the full screen. And the maximal zoom in i want to 400%.
Is there 开发者_如何转开发a way to do it?
Thanks
If you can modify the html you display, I would suggest doing it the easy way. insert this meta tag in the head element in HTML
<meta name='viewport' content='target-densitydpi=device-dpi,initial-scale=1,minimum-scale=1,user-scalable=yes'/>
you can modify the value of minimum-scale to suit your needs.
Doing it the hard way, I would suggest to
- disable the built-in zoom controls via WebSettings.setBuiltInZoomControls(false)
- add your own zoom control buttons on top of the WebView using FrameLayout
精彩评论