Refactoring

This commit is contained in:
M66B 2021-12-30 15:53:48 +01:00
parent 328a864f95
commit 28c550f90f
1 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,6 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
private int height;
private IWebView intf;
private Runnable onPageLoaded;
private static String userAgent = null;
private static final long PAGE_LOADED_FALLBACK_DELAY = 1500L; // milliseconds
@ -210,8 +209,10 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (height > getMinimumHeight())
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
else
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(getResources().getDisplayMetrics().heightPixels, MeasureSpec.AT_MOST));
else {
int max = getResources().getDisplayMetrics().heightPixels;
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(max, MeasureSpec.AT_MOST));
}
int mh = getMeasuredHeight();
Log.i("Measured height=" + mh + " last=" + height);