且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

单击 WebView 中的表单字段时禁用缩放?

更新时间:2023-10-05 23:24:34

此问题已通过 HTC 设备上的固件更新修复,它(显然)是由 Sense UI 错误地覆盖默认 Android 功能引起的.

This issue has been fixed by a firmware update on HTC devices, it was (apparently) being caused by the Sense UI overriding default Android functionality incorrectly.

很难提供有关何时更正此问题的确切信息,但是当在具有最新固件的任何 HTC 设备上单击文本框时,我的 Web 应用程序不再缩放.

It is very difficult to provide information on exactly when this was corrected, however my web application no longer zooms when a text box is clicked on any HTC device with the latest firmware.

以下两行代码将禁用 android webview 的缩放"方面:

The following two lines of code will disable the "zoom" aspects of an android webview:

// disables the actual onscreen controls from showing up
mWebView.getSettings().setBuiltInZoomControls(false);
// disables the ability to zoom
mWebView.getSettings().setSupportZoom(false);