diff --git a/android/app/build.gradle b/android/app/build.gradle index d9b3437b..e0026944 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "com.openipc.decoder" minSdk 21 targetSdk 36 - versionCode 31 - versionName "2.06" + versionCode 32 + versionName "2.07" buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\"" } diff --git a/android/app/src/main/java/com/openipc/decoder/MenuManager.java b/android/app/src/main/java/com/openipc/decoder/MenuManager.java index 413b74db..87af8ee0 100644 --- a/android/app/src/main/java/com/openipc/decoder/MenuManager.java +++ b/android/app/src/main/java/com/openipc/decoder/MenuManager.java @@ -626,6 +626,28 @@ public void onReceivedHttpAuthRequest( } LinearLayout layout = new LinearLayout(activity); layout.setOrientation(LinearLayout.VERTICAL); + // Android 15 draws apps edge to edge: the window starts under the status bar, which + // covered Close (#169). Keep the content inside the system bars and the cutout; the + // keyboard is still handled by adjustResize + layout.setOnApplyWindowInsetsListener((v, insets) -> { + int l, t, r, b; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + android.graphics.Insets bars = insets.getInsets( + android.view.WindowInsets.Type.systemBars() + | android.view.WindowInsets.Type.displayCutout()); + l = bars.left; + t = bars.top; + r = bars.right; + b = bars.bottom; + } else { + l = insets.getSystemWindowInsetLeft(); + t = insets.getSystemWindowInsetTop(); + r = insets.getSystemWindowInsetRight(); + b = insets.getSystemWindowInsetBottom(); + } + v.setPadding(l, t, r, b); + return insets; + }); // Close for a remote or a touchscreen TextView closeBtn = createItem("Close"); closeBtn.setOnClickListener(v -> dialog.cancel());