Scale web view font size with system font size

This commit is contained in:
sonora 2017-01-06 14:38:36 +01:00
parent 0dc18eca9f
commit 199158443f
2 changed files with 5 additions and 0 deletions

View file

@ -370,6 +370,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
settings.setDisplayZoomControls(false);
settings.setSupportZoom(true);
if (android.os.Build.VERSION.SDK_INT >= 14) {
//Scale web view font size with system font size
settings.setTextZoom((int) (ctx.getResources().getDisplayMetrics().density * 100f));
}

View file

@ -105,6 +105,10 @@ public class ContextMenuHelper {
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setSupportZoom(true);
if (android.os.Build.VERSION.SDK_INT >= 14) {
//Scale web view font size with system font size
settings.setTextZoom((int) (ctx.getResources().getDisplayMetrics().density * 100f));
}
wv.loadDataWithBaseURL(null, content, "text/html", "UTF-8", null);
// wv.loadUrl(OsMoService.SIGN_IN_URL + app.getSettings().OSMO_DEVICE_KEY.get());