[英]My website's font-size is bigger in Android System Webview
I made a website, and it looks just like I want it to look on Google Chrome and Firefox.我制作了一个网站,它看起来就像我希望它在 Google Chrome 和 Firefox 上看到的一样。
But today, I opened my website on Android System webview
and found, that my website's font size is bigger.但是今天,我在
Android System webview
上打开我的网站,发现我的网站字体变大了。
I tried to google this problem, but nothing seems to work.我试图用谷歌搜索这个问题,但似乎没有任何效果。
This is my website's Meta tag:这是我网站的 Meta 标签:
<meta name="viewport" content="width=320, initial-scale=1">
You can use this你可以用这个
WebView browser = (WebView) findViewById(R.id.webview);
browser.getSettings().setLoadWithOverviewMode(true);
browser.getSettings().setUseWideViewPort(true);
this fixes size based on screen size.这根据屏幕尺寸固定尺寸。 Else in alternative you also can manually set the text size in webview
或者,您也可以在 webview 中手动设置文本大小
WebSettings settings= webView.getSettings();
this这
settings.setTextSize(WebSettings.TextSize.SMALLEST);
or或
settings.setDefaultFontSize(10);//Larger number means larger font size
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.