Limit web view height to screen height

This commit is contained in:
M66B 2021-12-30 12:51:47 +01:00
parent f67977fc10
commit ca71550be7
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
if (height > getMinimumHeight())
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
else
super.onMeasure(widthMeasureSpec, heightMeasureSpec); // Unspecified
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(getResources().getDisplayMetrics().heightPixels, MeasureSpec.AT_MOST));
int mh = getMeasuredHeight();
Log.i("Measured height=" + mh + " last=" + height);