@capawesome/capacitor-android-edge-to-edge-support 8.0.0 → 8.0.2
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.
- package/README.md +22 -3
- package/android/build.gradle +1 -0
- package/android/consumer-rules.pro +21 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ Capacitor plugin to support [edge-to-edge](https://developer.android.com/develop
|
|
|
19
19
|
| Plugin Version | Capacitor Version | Status |
|
|
20
20
|
| -------------- | ----------------- | -------------- |
|
|
21
21
|
| 8.x.x | >=8.x.x | Active support |
|
|
22
|
+
| 7.x.x | 7.x.x | Deprecated |
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
24
25
|
|
|
@@ -29,7 +30,25 @@ npx cap sync
|
|
|
29
30
|
|
|
30
31
|
### Android
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
#### Capacitor SystemBars Plugin
|
|
34
|
+
|
|
35
|
+
Make sure to disable the built-in insets handling of the [Capacitor SystemBars](https://capacitorjs.com/docs/apis/system-bars) plugin in your [Capacitor Configuration](https://capacitorjs.com/docs/config) file:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"plugins": {
|
|
40
|
+
"SystemBars": {
|
|
41
|
+
"insetsHandling": "disable"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Please note that this plugin is part of the Capacitor core and the insets handling is **always enabled by default**.
|
|
48
|
+
|
|
49
|
+
#### Capacitor Keyboard Plugin
|
|
50
|
+
|
|
51
|
+
If you are using the [Capacitor Keyboard](https://capacitorjs.com/docs/apis/keyboard) plugin, make sure to set the `resizeOnFullScreen` property to `false` (default) in your [Capacitor Configuration](https://capacitorjs.com/docs/config) file:
|
|
33
52
|
|
|
34
53
|
```json
|
|
35
54
|
{
|
|
@@ -94,11 +113,11 @@ export default config;
|
|
|
94
113
|
|
|
95
114
|
## Usage
|
|
96
115
|
|
|
97
|
-
The plugin **only needs to be installed**. It applies insets to the web view to support edge-to-edge display on Android. The plugin also provides a method to set the background color of the status bar and navigation bar. It's recommended to use this method in combination with the [
|
|
116
|
+
The plugin **only needs to be installed**. It applies insets to the web view to support edge-to-edge display on Android. The plugin also provides a method to set the background color of the status bar and navigation bar. It's recommended to use this method in combination with the [SystemBars](https://capacitorjs.com/docs/apis/system-bars) plugin.
|
|
98
117
|
|
|
99
118
|
```typescript
|
|
100
119
|
import { EdgeToEdge } from '@capawesome/capacitor-android-edge-to-edge-support';
|
|
101
|
-
import { SystemBars, SystemBarsStyle } from '@capacitor/
|
|
120
|
+
import { SystemBars, SystemBarsStyle } from '@capacitor/core';
|
|
102
121
|
|
|
103
122
|
const enable = async () => {
|
|
104
123
|
await EdgeToEdge.enable();
|
package/android/build.gradle
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Capacitor Plugin ProGuard Rules
|
|
2
|
+
# These rules ensure the plugin works correctly when the consumer app uses minification
|
|
3
|
+
|
|
4
|
+
# Keep all plugin classes
|
|
5
|
+
-keep class io.capawesome.capacitorjs.plugins.androidedgetoedgesupport.** { *; }
|
|
6
|
+
|
|
7
|
+
# Keep Capacitor annotations (needed for reflection-based plugin loading)
|
|
8
|
+
-keep @com.getcapacitor.annotation.CapacitorPlugin class * { *; }
|
|
9
|
+
-keep @com.getcapacitor.PluginMethod class * { *; }
|
|
10
|
+
-keepclassmembers class * {
|
|
11
|
+
@com.getcapacitor.PluginMethod *;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
# Keep CoordinatorLayout.LayoutParams (used via reflection in EdgeToEdge.java)
|
|
15
|
+
-keep class androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams { *; }
|
|
16
|
+
|
|
17
|
+
# Keep AndroidX classes used by the plugin
|
|
18
|
+
-keep class androidx.core.view.ViewCompat { *; }
|
|
19
|
+
-keep class androidx.core.view.WindowInsetsCompat { *; }
|
|
20
|
+
-keep class androidx.core.view.WindowInsetsCompat$Type { *; }
|
|
21
|
+
-keep class androidx.core.graphics.Insets { *; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capawesome/capacitor-android-edge-to-edge-support",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Capacitor plugin to support edge-to-edge display on Android.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"android/src/main/",
|
|
11
11
|
"android/build.gradle",
|
|
12
|
+
"android/consumer-rules.pro",
|
|
12
13
|
"dist/"
|
|
13
14
|
],
|
|
14
15
|
"author": "Robin Genz <mail@robingenz.dev>",
|