1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 01:36:55 +00:00

Set default web view font size/family

This commit is contained in:
M66B 2019-03-11 16:28:05 +00:00
parent 1b8c531419
commit 2f6f0d474d

View file

@ -1445,6 +1445,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
settings.setAllowFileAccess(false);
// Set default font
int px = Math.round(TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_PX, textSize,
context.getResources().getDisplayMetrics()));
settings.setDefaultFontSize(px);
settings.setStandardFontFamily("monospace");
webView.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
onOpenLink(Uri.parse(url));