From cc249cc1165f5f572b08e68ef256737b3ee64a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Geh=C3=B6r?= Date: Tue, 3 Aug 2021 09:40:49 +0300 Subject: Android: Fix fullscreen bottom bar hide issues Hide bottom bar when the fullscreen is setted Fixes: QTBUG-94990 Change-Id: I530ed2f3a0774ba80ccf7ac92b9fb612f241de75 Reviewed-by: Ville Voutilainen Reviewed-by: Rami Potinkara --- src/android/jar/src/org/qtproject/qt5/android/QtLayout.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtLayout.java b/src/android/jar/src/org/qtproject/qt5/android/QtLayout.java index 45b5c0b061..e94ce60248 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtLayout.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtLayout.java @@ -77,14 +77,16 @@ public class QtLayout extends ViewGroup Rect r = new Rect(); ((Activity) getContext()).getWindow().getDecorView().getWindowVisibleDisplayFrame(r); - if (m_bottomDisplayFrame != r.bottom) { + if (m_bottomDisplayFrame != r.bottom || oldh == -1) { m_bottomDisplayFrame = r.bottom; QtNative.setApplicationDisplayMetrics(metrics.widthPixels, metrics.heightPixels, w, h, metrics.xdpi, metrics.ydpi, metrics.scaledDensity, metrics.density, - ((metrics.heightPixels == h) || (metrics.heightPixels == h + r.top))); + ((metrics.heightPixels == h) + || (metrics.heightPixels == h + r.top) + || (m_bottomDisplayFrame > metrics.heightPixels + r.top))); } } @@ -171,7 +173,7 @@ public class QtLayout extends ViewGroup } } - handleSizeChanged (r, b, 0, 0); + handleSizeChanged (r, b, 0, -1); } // Override to allow type-checking of LayoutParams. -- cgit v1.2.3