Show inline images in web view when enabled

This commit is contained in:
M66B 2019-07-07 23:19:42 +02:00
parent 74016592ac
commit 5662a25a3c
1 changed files with 5 additions and 1 deletions

View File

@ -3620,12 +3620,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
final WebView webView = dview.findViewById(R.id.webView);
final ContentLoadingProgressBar pbWait = dview.findViewById(R.id.pbWait);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean inline = prefs.getBoolean("inline_images", false);
setupWebView(webView);
WebSettings settings = webView.getSettings();
settings.setDefaultFontSize(Math.round(textSize));
settings.setDefaultFixedFontSize(Math.round(textSize));
settings.setLoadsImagesAutomatically(show_images);
settings.setLoadsImagesAutomatically(show_images || inline);
settings.setBlockNetworkImage(!show_images);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);