Skip to content

Commit fc201d0

Browse files
committed
fix: edge to edge layout issue
1 parent bd96fd6 commit fc201d0

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
- 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`.
1010
- We removed some unused Android Permissions coming in from Manifest mergers.
11+
- 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.
1112

1213
## [19.1.6] - 2026-09-16
1314

‎android/app/src/dev/java/com/mendix/nativetemplate/MainActivity.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
import androidx.appcompat.app.AppCompatActivity;
2121
import androidx.core.app.ActivityCompat;
2222
import androidx.core.content.ContextCompat;
23+
import androidx.core.graphics.Insets;
2324
import androidx.core.util.Consumer;
25+
import androidx.core.view.ViewCompat;
26+
import androidx.core.view.WindowInsetsCompat;
2427

2528
import com.google.zxing.Result;
2629
import com.mendix.mendixnative.activity.MendixReactActivity;
@@ -57,6 +60,13 @@ public class MainActivity extends AppCompatActivity implements ZXingScannerView.
5760
protected void onCreate(@Nullable Bundle savedInstanceState) {
5861
super.onCreate(savedInstanceState);
5962
setContentView(R.layout.activity_main_dev);
63+
// Edge-to-edge: keep the content clear of the system bars and display cutout
64+
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.root), (view, windowInsets) -> {
65+
Insets bars = windowInsets.getInsets(
66+
WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout());
67+
view.setPadding(bars.left, bars.top, bars.right, bars.bottom);
68+
return WindowInsetsCompat.CONSUMED;
69+
});
6070
getWindow().getDecorView().setFilterTouchesWhenObscured(true);
6171
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
6272
getWindow().setHideOverlayWindows(true);

0 commit comments

Comments
 (0)