|
|
|
@ -69,7 +69,6 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|
|
|
|
void init(
|
|
|
|
|
int height, float size, Pair<Integer, Integer> position,
|
|
|
|
|
float textSize, boolean monospaced,
|
|
|
|
|
boolean show_images, boolean inline,
|
|
|
|
|
IWebView intf) {
|
|
|
|
|
Log.i("Init height=" + height + " size=" + size);
|
|
|
|
|
|
|
|
|
@ -91,10 +90,6 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|
|
|
|
if (monospaced)
|
|
|
|
|
settings.setStandardFontFamily("monospace");
|
|
|
|
|
|
|
|
|
|
settings.setLoadsImagesAutomatically(show_images || inline);
|
|
|
|
|
settings.setBlockNetworkLoads(!show_images);
|
|
|
|
|
settings.setBlockNetworkImage(!show_images);
|
|
|
|
|
|
|
|
|
|
this.intf = intf;
|
|
|
|
|
|
|
|
|
|
setWebViewClient(new WebViewClient() {
|
|
|
|
@ -120,6 +115,13 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void setImages(boolean show_images, boolean inline) {
|
|
|
|
|
WebSettings settings = getSettings();
|
|
|
|
|
settings.setLoadsImagesAutomatically(show_images || inline);
|
|
|
|
|
settings.setBlockNetworkLoads(!show_images);
|
|
|
|
|
settings.setBlockNetworkImage(!show_images);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
|
|
|
if (height > getMinimumHeight())
|
|
|
|
|