mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Respect WebView max height
This commit is contained in:
@@ -217,6 +217,12 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||
settings.setBlockNetworkImage(!show_images);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMinimumHeight(int minHeight) {
|
||||
super.setMinimumHeight(minHeight);
|
||||
Log.i("Set min height=" + minHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (legacy) {
|
||||
@@ -230,6 +236,8 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||
|
||||
int mh = getMeasuredHeight();
|
||||
Log.i("Measured height=" + mh + " last=" + height + "/" + maxHeight + " ch=" + getContentHeight());
|
||||
if (mh > maxHeight)
|
||||
setMeasuredDimension(getMeasuredWidth(), maxHeight);
|
||||
if (mh == 0 && legacy)
|
||||
setMeasuredDimension(getMeasuredWidth(), height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user