Android Webview rem units scale way to large for boxes

前端 未结 1 772
无人及你
无人及你 2020-12-18 08:45

EDIT: This bug is Webview overriding the default minimum font size. In my example, Webview sets the minimum font-size to 8px somewhere. The solution is below :

相关标签:
1条回答
  • 2020-12-18 09:32

    I found that setting the following webview settings will act as a workaround for this bug.

    mWebView.getSettings().setMinimumFontSize(1);
    mWebView.getSettings().setMinimumLogicalFontSize(1);
    

    setMinimumFontSize

    These settings really should only be honored for actual text display, not rem based positioning/sizing. This must but an android webview bug.

    0 讨论(0)
提交回复
热议问题