fix: per-app scale via CSS zoom, hide download icon when local version matches
This commit is contained in:
@@ -43,18 +43,10 @@ class WebViewManager(private val activity: Activity) {
|
||||
ua == "desktop" || ua == "pc" -> UA_DESKTOP
|
||||
else -> ua
|
||||
}
|
||||
// 缩放(1-100):View 级别 scaleX/scaleY,不依赖页面渲染或 viewport,对任何页面可靠生效。
|
||||
// 缩放后内容相对左上角缩小;触摸坐标由 View 自动映射
|
||||
// Zoom (1-100): view-level scaleX/scaleY, independent of page rendering or
|
||||
// viewport, so it reliably works for any page. Content shrinks toward the
|
||||
// top-left; touch coordinates are auto-mapped by the View
|
||||
if (scale != null && scale in 1..100) {
|
||||
val s = scale / 100f
|
||||
webView.scaleX = s
|
||||
webView.scaleY = s
|
||||
webView.pivotX = 0f
|
||||
webView.pivotY = 0f
|
||||
}
|
||||
// scale 由 WebAppHost 在 onPageFinished 里通过 CSS zoom 实现(reflow 缩放),
|
||||
// 此处不再做 View 级别缩放
|
||||
// scale is applied by WebAppHost via CSS zoom in onPageFinished (reflow
|
||||
// scaling); no view-level scaling here
|
||||
return webView
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user