@capgo/inappbrowser 8.1.16 → 8.1.17
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.17";
|
|
59
59
|
|
|
60
60
|
public static final String CUSTOM_TAB_PACKAGE_NAME = "com.android.chrome"; // Change when in stable
|
|
61
61
|
private CustomTabsClient customTabsClient;
|
|
@@ -1103,6 +1103,19 @@ public class WebViewDialog extends Dialog {
|
|
|
1103
1103
|
View statusBarColorView = findViewById(R.id.status_bar_color_view);
|
|
1104
1104
|
View toolbarView = findViewById(R.id.tool_bar);
|
|
1105
1105
|
|
|
1106
|
+
// Fix content browser layout height for all Android versions to allow proper scrolling
|
|
1107
|
+
// This fixes landscape scrolling issues where bottom content is unreachable
|
|
1108
|
+
View contentBrowserLayout = findViewById(R.id.content_browser_layout);
|
|
1109
|
+
if (contentBrowserLayout != null) {
|
|
1110
|
+
ViewGroup.LayoutParams layoutParams = contentBrowserLayout.getLayoutParams();
|
|
1111
|
+
if (layoutParams != null) {
|
|
1112
|
+
// Use MATCH_PARENT for height to allow proper scrolling in all orientations
|
|
1113
|
+
// The AppBarLayout's layout_behavior will handle positioning automatically
|
|
1114
|
+
layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
|
1115
|
+
contentBrowserLayout.setLayoutParams(layoutParams);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1106
1119
|
// Special handling for Android 15+
|
|
1107
1120
|
if (isAndroid15Plus) {
|
|
1108
1121
|
// Get AppBarLayout which contains the toolbar
|
|
@@ -1150,31 +1163,6 @@ public class WebViewDialog extends Dialog {
|
|
|
1150
1163
|
params.topMargin = statusBarHeight;
|
|
1151
1164
|
appBarLayout.setLayoutParams(params);
|
|
1152
1165
|
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
1166
|
});
|
|
1179
1167
|
}
|
|
1180
1168
|
}
|
|
@@ -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.17"
|
|
32
32
|
public let identifier = "InAppBrowserPlugin"
|
|
33
33
|
public let jsName = "InAppBrowser"
|
|
34
34
|
public let pluginMethods: [CAPPluginMethod] = [
|