hybrid-navigation 2.14.6 → 2.15.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.
@@ -33,5 +33,5 @@ dependencies {
33
33
  implementation fileTree(dir: 'libs', include: ['*.jar'])
34
34
  implementation 'com.facebook.react:react-native:+'
35
35
  // api project(':navigation')
36
- api 'io.github.listenzz:AndroidNavigation:13.4.2'
36
+ api 'io.github.listenzz:AndroidNavigation:13.5.0'
37
37
  }
@@ -64,6 +64,8 @@ public class Garden {
64
64
  boolean extendedLayoutIncludesTopBar;
65
65
 
66
66
  boolean forceTransparentDialogWindow;
67
+
68
+ boolean fitsOpaqueNavigationBar;
67
69
 
68
70
  Garden(@NonNull HybridFragment fragment, Style style) {
69
71
  // 构造 garden 实例时,Toolbar 还没有被创建
@@ -79,6 +81,7 @@ public class Garden {
79
81
  Bundle tabItem = options.getBundle("tabItem");
80
82
  this.hidesBottomBarWhenPushed = tabItem == null || tabItem.getBoolean("hideTabBarWhenPush", true);
81
83
  this.extendedLayoutIncludesTopBar = options.getBoolean("extendedLayoutIncludesTopBar", false);
84
+ this.fitsOpaqueNavigationBar = options.getBoolean("fitsOpaqueNavigationBarAndroid", false);
82
85
 
83
86
  String screenColor = options.getString("screenBackgroundColor");
84
87
  if (!TextUtils.isEmpty(screenColor)) {
@@ -152,6 +152,11 @@ public class HybridFragment extends AwesomeFragment {
152
152
  return garden.hidesBottomBarWhenPushed;
153
153
  }
154
154
 
155
+ @Override
156
+ protected boolean shouldFitsOpaqueNavigationBar() {
157
+ return garden.fitsOpaqueNavigationBar;
158
+ }
159
+
155
160
  protected boolean shouldPassThroughTouches() {
156
161
  Bundle options = getOptions();
157
162
  return options.getBoolean("passThroughTouches");
package/lib/Options.d.ts CHANGED
@@ -35,6 +35,7 @@ export interface NavigationOption {
35
35
  titleTextSize?: number;
36
36
  navigationBarColorAndroid?: Color;
37
37
  navigationBarHiddenAndroid?: boolean;
38
+ fitsOpaqueNavigationBarAndroid?: boolean;
38
39
  displayCutoutWhenLandscapeAndroid?: boolean;
39
40
  homeIndicatorAutoHiddenIOS?: boolean;
40
41
  backButtonHidden?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hybrid-navigation",
3
3
  "description": "React Native Navigation that supports seamless navigation between Native and React.",
4
- "version": "2.14.6",
4
+ "version": "2.15.1",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
7
7
  "react-native": "src/index",
@@ -51,22 +51,23 @@
51
51
  "path-to-regexp": "^6.1.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@babel/core": "^7.16.0",
55
- "@babel/preset-env": "^7.16.0",
56
- "@babel/runtime": "^7.16.0",
54
+ "@babel/core": "^7.20.0",
55
+ "@babel/preset-env": "^7.20.0",
56
+ "@babel/runtime": "^7.20.0",
57
57
  "@gfez/eslint-config-react-native": "^1.0.0",
58
58
  "@react-native-community/hooks": "^2.8.0",
59
+ "@react-native-community/slider": "^4.4.2",
59
60
  "@types/jest": "^29.2.1",
60
61
  "@types/react": "^18.0.24",
61
62
  "@types/react-redux": "^7.1.9",
62
63
  "@types/react-test-renderer": "^18.0.0",
63
64
  "babel-jest": "^29.2.1",
64
65
  "jest": "^29.2.1",
65
- "metro-react-native-babel-preset": "0.73.5",
66
+ "metro-react-native-babel-preset": "0.73.7",
66
67
  "react": "18.2.0",
67
- "react-native": "^0.71.0",
68
+ "react-native": "^0.71.3",
68
69
  "react-native-fast-image": "^8.5.11",
69
- "react-native-keyboard-insets": "^1.1.0",
70
+ "react-native-keyboard-insets": "^1.3.3",
70
71
  "react-native-safe-area-context": "^4.5.0",
71
72
  "react-native-toast-hybrid": "^2.5.0",
72
73
  "react-redux": "^7.2.5",
package/src/Options.ts CHANGED
@@ -34,6 +34,7 @@ export interface NavigationOption {
34
34
  titleTextSize?: number // TopBar 标题字体大小
35
35
  navigationBarColorAndroid?: Color // Android 底部虚拟按钮背景颜色
36
36
  navigationBarHiddenAndroid?: boolean // 是否隐藏 Android 底部的虚拟导航栏
37
+ fitsOpaqueNavigationBarAndroid?: boolean // 不要将页面内容延伸至不透明的虚拟导航栏下方,默认为延伸(false)
37
38
  displayCutoutWhenLandscapeAndroid?: boolean // 横屏时,是否将界面延伸至刘海区域,默认 true
38
39
  homeIndicatorAutoHiddenIOS?: boolean // 是否隐藏 Home 指示器,默认 false
39
40