0

在我的活动中,所有内容都在 webview 中使用所有 web 设置进行管理。我的活动内容每 1 秒刷新一次。因此,当我尝试缩放 webview 时。每隔一秒的 webview 就会保持原来的位置。

我想在 webview 中保持缩放状态。这仅在版本 4.0.3 中发生。

my webview is in Timer function . and all settings of webview are below .which 
outside of Timer function :
 web.getSettings().setBuiltInZoomControls(true);
 web.getSettings().setSupportZoom(true);

请帮我。如果有人知道。

4

1 回答 1

0

Maybe if you use these function:

https://developer.android.com/reference/android/webkit/WebSettings.html#getDefaultZoom()

https://developer.android.com/reference/android/webkit/WebSettings.html#setDefaultZoom(android.webkit.WebSettings.ZoomDensity)

You'll be able to read the zoom level before refreshing, and set it again after the refresh if finished?

于 2012-09-18T09:12:56.683 回答