Disable zoom of inline WebView

This commit is contained in:
M66B 2019-04-29 21:02:54 +02:00
parent ada668da2a
commit 2414916b89
1 changed files with 5 additions and 3 deletions

View File

@ -1515,7 +1515,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
setupWebView(webView);
boolean show_images = properties.getValue("images", message.id);
webView.getSettings().setLoadsImagesAutomatically(show_images);
WebSettings settings = webView.getSettings();
settings.setLoadsImagesAutomatically(show_images);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
String html = properties.getHtml(message.id);
webView.loadDataWithBaseURL("email://", html, "text/html", "UTF-8", null);
@ -1580,8 +1584,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
settings.setAllowFileAccess(false);