安卓:在网页视图限制缩小 [英] Android: Limiting Zoom Out in Webview

查看:150
本文介绍了安卓:在网页视图限制缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示我的应用程序的区域地图。这张地图是作为一个大的JPG文件(> 1000像素×1000像素)。我在一个web视图显示了它,我在缩放控制和zoompicker,其中工程pretty以及同时使用的版本。现在我想限制变焦,使图像不能超过列表视图高度。因为当我缩小,并且图像变小,白色区域是显示的网页视图下方,这是whatI希望避免的。

I have to display an area map in my application. This map is provided as a large jpg file (>1000px * 1000 px). I display it in a webview and I also use the build in zoom controls and the zoompicker, which works pretty well. Now I want to limit the zoom, so that the image can't be smaller than the listview height. Because when I zoom out, and the image gets smaller, a white area is display underneath the webview and this is whatI want to avoid.

问候,霍夫

推荐答案

在头元素插入此meta标签:

Insert this meta tag in the head element:

<meta name='viewport' content='target-densitydpi=device-dpi,initial-scale=1,minimum-scale=1,user-scalable=yes'/>

这篇关于安卓:在网页视图限制缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆