Skip to content

Commit b478211

Browse files
authored
fix(android): consider display cutout area for insets (#8042)
1 parent 87b4641 commit b478211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/capacitor/src/main/java/com/getcapacitor/CapacitorWebView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void edgeToEdgeHandler(Bridge bridge) {
7373

7474
if (forceMargins || autoMargins) {
7575
ViewCompat.setOnApplyWindowInsetsListener(this, (v, windowInsets) -> {
76-
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
76+
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout());
7777
MarginLayoutParams mlp = (MarginLayoutParams) v.getLayoutParams();
7878
mlp.leftMargin = insets.left;
7979
mlp.bottomMargin = insets.bottom;

0 commit comments

Comments
 (0)