@capgo/inappbrowser 8.1.16 → 8.1.18
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.
|
@@ -55,7 +55,7 @@ import org.json.JSONObject;
|
|
|
55
55
|
)
|
|
56
56
|
public class InAppBrowserPlugin extends Plugin implements WebViewDialog.PermissionHandler {
|
|
57
57
|
|
|
58
|
-
private final String pluginVersion = "8.1.
|
|
58
|
+
private final String pluginVersion = "8.1.18";
|
|
59
59
|
|
|
60
60
|
public static final String CUSTOM_TAB_PACKAGE_NAME = "com.android.chrome"; // Change when in stable
|
|
61
61
|
private CustomTabsClient customTabsClient;
|
|
@@ -883,10 +883,6 @@ public class InAppBrowserPlugin extends Plugin implements WebViewDialog.Permissi
|
|
|
883
883
|
call.reject("WebView is not initialized");
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
|
-
if (!webViewDialog.isFakeVisibleMode()) {
|
|
887
|
-
call.reject("show() is only supported when invisibilityMode is FAKE_VISIBLE");
|
|
888
|
-
return;
|
|
889
|
-
}
|
|
890
886
|
if (!webViewDialog.isShowing()) {
|
|
891
887
|
webViewDialog.show();
|
|
892
888
|
}
|
|
@@ -1080,10 +1080,6 @@ public class WebViewDialog extends Dialog {
|
|
|
1080
1080
|
return isHiddenModeActive;
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
-
public boolean isFakeVisibleMode() {
|
|
1084
|
-
return _options != null && _options.getInvisibilityMode() == Options.InvisibilityMode.FAKE_VISIBLE;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
1083
|
/**
|
|
1088
1084
|
* Apply window insets to the WebView to properly handle edge-to-edge display
|
|
1089
1085
|
* and fix status bar overlap issues on Android 15+
|
|
@@ -1103,6 +1099,19 @@ public class WebViewDialog extends Dialog {
|
|
|
1103
1099
|
View statusBarColorView = findViewById(R.id.status_bar_color_view);
|
|
1104
1100
|
View toolbarView = findViewById(R.id.tool_bar);
|
|
1105
1101
|
|
|
1102
|
+
// Fix content browser layout height for all Android versions to allow proper scrolling
|
|
1103
|
+
// This fixes landscape scrolling issues where bottom content is unreachable
|
|
1104
|
+
View contentBrowserLayout = findViewById(R.id.content_browser_layout);
|
|
1105
|
+
if (contentBrowserLayout != null) {
|
|
1106
|
+
ViewGroup.LayoutParams layoutParams = contentBrowserLayout.getLayoutParams();
|
|
1107
|
+
if (layoutParams != null) {
|
|
1108
|
+
// Use MATCH_PARENT for height to allow proper scrolling in all orientations
|
|
1109
|
+
// The AppBarLayout's layout_behavior will handle positioning automatically
|
|
1110
|
+
layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
1111
|
+
contentBrowserLayout.setLayoutParams(layoutParams);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1106
1115
|
// Special handling for Android 15+
|
|
1107
1116
|
if (isAndroid15Plus) {
|
|
1108
1117
|
// Get AppBarLayout which contains the toolbar
|
|
@@ -1150,31 +1159,6 @@ public class WebViewDialog extends Dialog {
|
|
|
1150
1159
|
params.topMargin = statusBarHeight;
|
|
1151
1160
|
appBarLayout.setLayoutParams(params);
|
|
1152
1161
|
appBarLayout.setBackgroundColor(finalBgColor);
|
|
1153
|
-
View contentBrowserLayout = findViewById(R.id.content_browser_layout);
|
|
1154
|
-
View parentContainer = findViewById(android.R.id.content);
|
|
1155
|
-
if (contentBrowserLayout == null || parentContainer == null) {
|
|
1156
|
-
Log.w("InAppBrowser", "Required views not found for height calculation");
|
|
1157
|
-
return;
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
ViewGroup.LayoutParams layoutParams = contentBrowserLayout.getLayoutParams();
|
|
1161
|
-
if (!(layoutParams instanceof ViewGroup.MarginLayoutParams)) {
|
|
1162
|
-
Log.w("InAppBrowser", "Content browser layout does not support margins");
|
|
1163
|
-
return;
|
|
1164
|
-
}
|
|
1165
|
-
ViewGroup.MarginLayoutParams mlpContentBrowserLayout = (ViewGroup.MarginLayoutParams) layoutParams;
|
|
1166
|
-
|
|
1167
|
-
int parentHeight = parentContainer.getHeight();
|
|
1168
|
-
int appBarHeight = appBarLayout.getHeight(); // can be 0 if not visible with the toolbar type BLANK
|
|
1169
|
-
|
|
1170
|
-
if (parentHeight <= 0) {
|
|
1171
|
-
Log.w("InAppBrowser", "Parent dimensions not yet available");
|
|
1172
|
-
return;
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
// Recompute the height of the content browser to be able to set margin bottom as we want to
|
|
1176
|
-
mlpContentBrowserLayout.height = parentHeight - (statusBarHeight + appBarHeight);
|
|
1177
|
-
contentBrowserLayout.setLayoutParams(mlpContentBrowserLayout);
|
|
1178
1162
|
});
|
|
1179
1163
|
}
|
|
1180
1164
|
}
|
|
@@ -28,7 +28,7 @@ public class InAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
28
28
|
case aware = "AWARE"
|
|
29
29
|
case fakeVisible = "FAKE_VISIBLE"
|
|
30
30
|
}
|
|
31
|
-
private let pluginVersion: String = "8.1.
|
|
31
|
+
private let pluginVersion: String = "8.1.18"
|
|
32
32
|
public let identifier = "InAppBrowserPlugin"
|
|
33
33
|
public let jsName = "InAppBrowser"
|
|
34
34
|
public let pluginMethods: [CAPPluginMethod] = [
|