WebView 包装内容 [英] WebView wrap-content

查看:29
本文介绍了WebView 包装内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 WebView 中加载 URL 并调整其大小以适合屏幕?我的意思是我想让网页变小,这样用户就不需要滚动.这可能吗?

Is it possible to load a URL in a WebView and resize it to fit the screen? I mean I want to make the WebPage small so that the user doesn't need to scroll. Is this possible?

推荐答案

如前所述,用户不希望缩小太多,因为它会降低内容的易读性.

As mentioned, zooming out too much is not something the user would like cause it'll reduce the legibility of the content.

我建议尝试设置缩放控件,但是,我不知道它是否适用于 2.1.

I would suggest trying to set the zoom controls, however, I don't know if it'll work in 2.1.

webview.getSettings().setBuiltInZoomControls(true);

希望这能解决问题,因为您现在为用户提供更改缩放级别的控制权.

Hope this solves the problem as you now are giving user the control to change the zoom level.

这篇关于WebView 包装内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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