@capacitor/android 7.0.1 → 7.0.2-dev-20250205T174104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ public class CapacitorWebView extends WebView {
15
15
 
16
16
  public CapacitorWebView(Context context, AttributeSet attrs) {
17
17
  super(context, attrs);
18
+ edgeToEdgeHandler();
18
19
  }
19
20
 
20
21
  public void setBridge(Bridge bridge) {
@@ -49,4 +50,20 @@ public class CapacitorWebView extends WebView {
49
50
  }
50
51
  return super.dispatchKeyEvent(event);
51
52
  }
53
+
54
+ private void edgeToEdgeHandler() {
55
+ ViewCompat.setOnApplyWindowInsetsListener(this, (v, windowInsets) -> {
56
+ Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
57
+
58
+ MarginLayoutParams mlp = (MarginLayoutParams) v.getLayoutParams();
59
+ mlp.leftMargin = insets.left;
60
+ mlp.bottomMargin = insets.bottom;
61
+ mlp.rightMargin = insets.right;
62
+ mlp.topMargin = insets.top;
63
+ v.setLayoutParams(mlp);
64
+
65
+ // Don't pass window insets to children
66
+ return WindowInsetsCompat.CONSUMED;
67
+ });
68
+ }
52
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/android",
3
- "version": "7.0.1",
3
+ "version": "7.0.2-dev-20250205T174104.0",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -23,7 +23,7 @@
23
23
  "verify": "./gradlew clean lint build test -b capacitor/build.gradle"
24
24
  },
25
25
  "peerDependencies": {
26
- "@capacitor/core": "^7.0.0"
26
+ "@capacitor/core": "^7.0.0-dev-20250205T174104.0"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"