From fc201d0fa544ea91df02ce41418dd3aafc887c94 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Thu, 22 Oct 2026 15:05:07 +0530 Subject: [PATCH] fix: edge to edge layout issue --- CHANGELOG.md | 1 + .../java/com/mendix/nativetemplate/MainActivity.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 432c7c4cb..cea38c72e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - We fixed an issue on iOS where a deep link that cold started the app was not delivered to React Native, causing `Linking.getInitialURL()` to return `null`. - We removed some unused Android Permissions coming in from Manifest mergers. +- We fixed an issue on Android where the "Clear data" checkbox on the starting page of the Developer App was hidden behind the bottom navigation bar due to edge-to-edge. ## [19.1.6] - 2026-09-16 diff --git a/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java b/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java index b7158db47..5093654a8 100644 --- a/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java +++ b/android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java @@ -20,7 +20,10 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; +import androidx.core.graphics.Insets; import androidx.core.util.Consumer; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; import com.google.zxing.Result; import com.mendix.mendixnative.activity.MendixReactActivity; @@ -57,6 +60,13 @@ public class MainActivity extends AppCompatActivity implements ZXingScannerView. protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_dev); + // Edge-to-edge: keep the content clear of the system bars and display cutout + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.root), (view, windowInsets) -> { + Insets bars = windowInsets.getInsets( + WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); + view.setPadding(bars.left, bars.top, bars.right, bars.bottom); + return WindowInsetsCompat.CONSUMED; + }); getWindow().getDecorView().setFilterTouchesWhenObscured(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { getWindow().setHideOverlayWindows(true);