Simplification

This commit is contained in:
M66B 2022-01-04 18:31:12 +01:00
parent 9f1fd3bd1f
commit 3e0e00c418
1 changed files with 2 additions and 5 deletions

View File

@ -223,15 +223,12 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
else else
super.onMeasure(widthMeasureSpec, heightMeasureSpec); // Unspecified super.onMeasure(widthMeasureSpec, heightMeasureSpec); // Unspecified
} else { } else {
if (height > getMinimumHeight()) super.onMeasure(widthMeasureSpec, heightMeasureSpec);
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(Math.min(height, maxHeight), MeasureSpec.AT_MOST));
else
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(maxHeight, MeasureSpec.AT_MOST));
} }
int mh = getMeasuredHeight(); int mh = getMeasuredHeight();
Log.i("Measured height=" + mh + " last=" + height + "/" + maxHeight + " ch=" + getContentHeight()); Log.i("Measured height=" + mh + " last=" + height + "/" + maxHeight + " ch=" + getContentHeight());
if (mh == 0) if (mh == 0 && legacy)
setMeasuredDimension(getMeasuredWidth(), height); setMeasuredDimension(getMeasuredWidth(), height);
} }