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:
parent
1b8c531419
commit
2f6f0d474d
1 changed files with 7 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue