fix: disable overview mode for per-app scale to take effect
This commit is contained in:
@@ -43,9 +43,12 @@ class WebViewManager(private val activity: Activity) {
|
||||
ua == "desktop" || ua == "pc" -> UA_DESKTOP
|
||||
else -> ua
|
||||
}
|
||||
// 初始缩放(1-100):用于 PC 版页面缩放适配横屏
|
||||
// Initial zoom (1-100): scale desktop pages to fit landscape
|
||||
// 初始缩放(1-100):用于 PC 版页面缩放适配横屏。
|
||||
// 需关闭 overview 模式,否则 useWideViewPort+overview 会自动重新缩放并覆盖 setInitialScale
|
||||
// Initial zoom (1-100): scale desktop pages to fit landscape. Must disable
|
||||
// overview mode, otherwise useWideViewPort+overview re-zooms and overrides setInitialScale
|
||||
if (scale != null && scale in 1..100) {
|
||||
webView.settings.loadWithOverviewMode = false
|
||||
webView.setInitialScale(scale)
|
||||
}
|
||||
return webView
|
||||
|
||||
Reference in New Issue
Block a user