mirror of https://github.com/M66B/FairEmail.git
Set default web view font size/family
This commit is contained in:
parent
1b8c531419
commit
2f6f0d474d
|
@ -1445,6 +1445,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
settings.setAllowFileAccess(false);
|
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() {
|
webView.setWebViewClient(new WebViewClient() {
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
onOpenLink(Uri.parse(url));
|
onOpenLink(Uri.parse(url));
|
||||||
|
|
Loading…
Reference in New Issue