@capgo/inappbrowser 7.26.0 → 7.26.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.
|
@@ -50,7 +50,7 @@ import org.json.JSONObject;
|
|
|
50
50
|
)
|
|
51
51
|
public class InAppBrowserPlugin extends Plugin implements WebViewDialog.PermissionHandler {
|
|
52
52
|
|
|
53
|
-
private final String PLUGIN_VERSION = "7.26.
|
|
53
|
+
private final String PLUGIN_VERSION = "7.26.1";
|
|
54
54
|
|
|
55
55
|
public static final String CUSTOM_TAB_PACKAGE_NAME = "com.android.chrome"; // Change when in stable
|
|
56
56
|
private CustomTabsClient customTabsClient;
|
|
@@ -660,6 +660,7 @@ public class InAppBrowserPlugin extends Plugin implements WebViewDialog.Permissi
|
|
|
660
660
|
);
|
|
661
661
|
webViewDialog.activity = InAppBrowserPlugin.this.getActivity();
|
|
662
662
|
webViewDialog.presentWebView();
|
|
663
|
+
call.resolve();
|
|
663
664
|
}
|
|
664
665
|
}
|
|
665
666
|
);
|
|
@@ -928,22 +928,26 @@ public class WebViewDialog extends Dialog {
|
|
|
928
928
|
|
|
929
929
|
// Apply system insets to WebView content view (compatible with all Android versions)
|
|
930
930
|
ViewCompat.setOnApplyWindowInsetsListener(_webView, (v, windowInsets) -> {
|
|
931
|
-
Insets
|
|
931
|
+
Insets bars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
|
932
|
+
Insets ime = windowInsets.getInsets(WindowInsetsCompat.Type.ime());
|
|
932
933
|
Boolean keyboardVisible = windowInsets.isVisible(WindowInsetsCompat.Type.ime());
|
|
933
934
|
|
|
934
935
|
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
|
|
935
936
|
|
|
936
|
-
//
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
937
|
+
// Apply safe margin inset to bottom margin if enabled in options or fallback to 0px
|
|
938
|
+
int navBottom = _options.getEnabledSafeMargin() ? bars.bottom : 0;
|
|
939
|
+
|
|
940
|
+
// Apply top inset only if useTopInset option is enabled or fallback to 0px
|
|
941
|
+
int navTop = _options.getUseTopInset() ? bars.top : 0;
|
|
942
|
+
|
|
943
|
+
// Avoid double-applying top inset; AppBar/status bar handled above on Android 15+
|
|
944
|
+
mlp.topMargin = isAndroid15Plus ? 0 : navTop;
|
|
945
|
+
|
|
946
|
+
// Apply larger of navigation bar or keyboard inset to bottom margin
|
|
947
|
+
mlp.bottomMargin = Math.max(navBottom, ime.bottom);
|
|
942
948
|
|
|
943
|
-
|
|
944
|
-
mlp.
|
|
945
|
-
mlp.leftMargin = insets.left;
|
|
946
|
-
mlp.rightMargin = insets.right;
|
|
949
|
+
mlp.leftMargin = bars.left;
|
|
950
|
+
mlp.rightMargin = bars.right;
|
|
947
951
|
v.setLayoutParams(mlp);
|
|
948
952
|
|
|
949
953
|
return WindowInsetsCompat.CONSUMED;
|
|
@@ -24,7 +24,7 @@ extension UIColor {
|
|
|
24
24
|
*/
|
|
25
25
|
@objc(InAppBrowserPlugin)
|
|
26
26
|
public class InAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
27
|
-
private let PLUGIN_VERSION: String = "7.26.
|
|
27
|
+
private let PLUGIN_VERSION: String = "7.26.1"
|
|
28
28
|
public let identifier = "InAppBrowserPlugin"
|
|
29
29
|
public let jsName = "InAppBrowser"
|
|
30
30
|
public let pluginMethods: [CAPPluginMethod] = [
|