@capawesome/capacitor-android-edge-to-edge-support 7.2.0 → 7.2.1
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
CHANGED
|
@@ -80,6 +80,19 @@ The plugin **only needs to be installed**. It applies insets to the web view to
|
|
|
80
80
|
import { EdgeToEdge } from '@capawesome/capacitor-android-edge-to-edge-support';
|
|
81
81
|
import { StatusBar, Style } from '@capacitor/status-bar';
|
|
82
82
|
|
|
83
|
+
const enable = async () => {
|
|
84
|
+
await EdgeToEdge.enable();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const disable = async () => {
|
|
88
|
+
await EdgeToEdge.disable();
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const getInsets = async () => {
|
|
92
|
+
const result = await EdgeToEdge.getInsets();
|
|
93
|
+
console.log('Insets:', result);
|
|
94
|
+
};
|
|
95
|
+
|
|
83
96
|
const setBackgroundColor = async () => {
|
|
84
97
|
await EdgeToEdge.setBackgroundColor({ color: '#ffffff' });
|
|
85
98
|
await StatusBar.setStyle({ style: Style.Light });
|
|
@@ -59,8 +59,11 @@ public class EdgeToEdgePlugin extends Plugin {
|
|
|
59
59
|
call.reject(ERROR_COLOR_MISSING);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
getActivity()
|
|
63
|
+
.runOnUiThread(() -> {
|
|
64
|
+
implementation.setBackgroundColor(color);
|
|
65
|
+
call.resolve();
|
|
66
|
+
});
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
private EdgeToEdgeConfig getEdgeToEdgeConfig() {
|
package/package.json
CHANGED