diff --git a/QtZeroConf b/QtZeroConf index 4ab1f560..725c6fd6 160000 --- a/QtZeroConf +++ b/QtZeroConf @@ -1 +1 @@ -Subproject commit 4ab1f560a95294c9e5abac569943e8219dc89b77 +Subproject commit 725c6fd690b878959d81c0b4068394e77683fd7f diff --git a/nymea-app/platformintegration/android/java/io/guh/nymeaapp/NymeaAppActivity.java b/nymea-app/platformintegration/android/java/io/guh/nymeaapp/NymeaAppActivity.java index 6345d2e1..75dbb601 100644 --- a/nymea-app/platformintegration/android/java/io/guh/nymeaapp/NymeaAppActivity.java +++ b/nymea-app/platformintegration/android/java/io/guh/nymeaapp/NymeaAppActivity.java @@ -17,7 +17,6 @@ import android.content.IntentFilter; import android.content.BroadcastReceiver; import android.location.LocationManager; import androidx.core.content.FileProvider; -import androidx.core.view.ViewCompat; import androidx.core.view.WindowCompat; import android.view.WindowInsets; import android.graphics.Insets; @@ -32,6 +31,7 @@ public class NymeaAppActivity extends QtActivity { private static final String TAG = "nymea-app: NymeaAppActivity"; private static Context context = null; + private boolean mDecorFitsSystemWindows = true; private static native void darkModeEnabledChangedJNI(); private static native void notificationActionReceivedJNI(String data); @@ -50,7 +50,13 @@ public class NymeaAppActivity extends QtActivity @Override public void onCreate(Bundle savedInstanceState) { Log.w(TAG, "Create activity"); + setTheme(R.style.NormalTheme); super.onCreate(savedInstanceState); + if (Build.VERSION.SDK_INT >= 35) { + // Let the system handle insets to avoid double padding in Qt content. + WindowCompat.setDecorFitsSystemWindows(getWindow(), true); + mDecorFitsSystemWindows = true; + } // Move th app to the background (Edge to edge is forced since SDK 35) //WindowCompat.setDecorFitsSystemWindows(getWindow(), true); this.context = getApplicationContext(); @@ -150,7 +156,7 @@ public class NymeaAppActivity extends QtActivity } public int topPadding() { - if (Build.VERSION.SDK_INT < 35) { + if (mDecorFitsSystemWindows || Build.VERSION.SDK_INT < 35) { return 0; } @@ -169,7 +175,7 @@ public class NymeaAppActivity extends QtActivity } public int bottomPadding() { - if (Build.VERSION.SDK_INT < 35) { + if (mDecorFitsSystemWindows || Build.VERSION.SDK_INT < 35) { return 0; } @@ -187,7 +193,7 @@ public class NymeaAppActivity extends QtActivity } public int leftPadding() { - if (Build.VERSION.SDK_INT < 35) { + if (mDecorFitsSystemWindows || Build.VERSION.SDK_INT < 35) { return 0; } @@ -205,7 +211,7 @@ public class NymeaAppActivity extends QtActivity } public int rightPadding() { - if (Build.VERSION.SDK_INT < 35) { + if (mDecorFitsSystemWindows || Build.VERSION.SDK_INT < 35) { return 0; } diff --git a/nymea-app/platformintegration/android/platformhelperandroid.cpp b/nymea-app/platformintegration/android/platformhelperandroid.cpp index ee7c5a0b..5dea8902 100644 --- a/nymea-app/platformintegration/android/platformhelperandroid.cpp +++ b/nymea-app/platformintegration/android/platformhelperandroid.cpp @@ -31,6 +31,10 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#include +#endif + // WindowManager.LayoutParams #define FLAG_TRANSLUCENT_STATUS 0x04000000 #define FLAG_TRANSLUCENT_NAVIGATION 0x08000000 @@ -110,10 +114,15 @@ void PlatformHelperAndroid::hideSplashScreen() { // Android's splash will flicker when fading out twice static bool alreadyHiding = false; - if (!alreadyHiding) { - //QtAndroid::hideSplashScreen(250); - alreadyHiding = true; + if (alreadyHiding) { + return; } + + alreadyHiding = true; + PlatformHelper::hideSplashScreen(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QtAndroid::hideSplashScreen(250); +#endif } QString PlatformHelperAndroid::machineHostname() const diff --git a/nymea-remoteproxy b/nymea-remoteproxy index b57d178b..a1226a69 160000 --- a/nymea-remoteproxy +++ b/nymea-remoteproxy @@ -1 +1 @@ -Subproject commit b57d178bf33ca647798b4ff02d63869b2b15fa4d +Subproject commit a1226a693739b02ab3b3d6123fb2508712fe5f80