hybrid-navigation 2.15.0 → 2.15.2
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/android/build.gradle
CHANGED
|
@@ -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.5.
|
|
36
|
+
api 'io.github.listenzz:AndroidNavigation:13.5.1'
|
|
37
37
|
}
|
|
@@ -81,7 +81,7 @@ public class Garden {
|
|
|
81
81
|
Bundle tabItem = options.getBundle("tabItem");
|
|
82
82
|
this.hidesBottomBarWhenPushed = tabItem == null || tabItem.getBoolean("hideTabBarWhenPush", true);
|
|
83
83
|
this.extendedLayoutIncludesTopBar = options.getBoolean("extendedLayoutIncludesTopBar", false);
|
|
84
|
-
this.fitsOpaqueNavigationBar = options.getBoolean("fitsOpaqueNavigationBarAndroid",
|
|
84
|
+
this.fitsOpaqueNavigationBar = options.getBoolean("fitsOpaqueNavigationBarAndroid", false);
|
|
85
85
|
|
|
86
86
|
String screenColor = options.getString("screenBackgroundColor");
|
|
87
87
|
if (!TextUtils.isEmpty(screenColor)) {
|
|
@@ -16,6 +16,7 @@ import androidx.annotation.Nullable;
|
|
|
16
16
|
import com.facebook.react.ReactInstanceManager;
|
|
17
17
|
import com.facebook.react.ReactNativeHost;
|
|
18
18
|
import com.facebook.react.bridge.ReactContext;
|
|
19
|
+
import com.navigation.androidx.AppUtils;
|
|
19
20
|
import com.navigation.androidx.AwesomeFragment;
|
|
20
21
|
import com.navigation.androidx.AwesomeToolbar;
|
|
21
22
|
import com.navigation.androidx.BarStyle;
|
|
@@ -153,10 +154,22 @@ public class HybridFragment extends AwesomeFragment {
|
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
@Override
|
|
156
|
-
protected boolean
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
protected boolean shouldFitsNavigationBar() {
|
|
158
|
+
if (preferredNavigationBarHidden()) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (!preferredEdgeToEdge()) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
159
165
|
|
|
166
|
+
if (shouldFitsTabBar()) {
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return AppUtils.isOpaque(preferredNavigationBarColor()) && garden.fitsOpaqueNavigationBar;
|
|
171
|
+
}
|
|
172
|
+
|
|
160
173
|
protected boolean shouldPassThroughTouches() {
|
|
161
174
|
Bundle options = getOptions();
|
|
162
175
|
return options.getBoolean("passThroughTouches");
|
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.15.
|
|
4
|
+
"version": "2.15.2",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
7
7
|
"react-native": "src/index",
|
package/src/Options.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface NavigationOption {
|
|
|
34
34
|
titleTextSize?: number // TopBar 标题字体大小
|
|
35
35
|
navigationBarColorAndroid?: Color // Android 底部虚拟按钮背景颜色
|
|
36
36
|
navigationBarHiddenAndroid?: boolean // 是否隐藏 Android 底部的虚拟导航栏
|
|
37
|
-
fitsOpaqueNavigationBarAndroid?: boolean //
|
|
37
|
+
fitsOpaqueNavigationBarAndroid?: boolean // 不要将页面内容延伸至不透明的虚拟导航栏下方,默认为延伸(false)
|
|
38
38
|
displayCutoutWhenLandscapeAndroid?: boolean // 横屏时,是否将界面延伸至刘海区域,默认 true
|
|
39
39
|
homeIndicatorAutoHiddenIOS?: boolean // 是否隐藏 Home 指示器,默认 false
|
|
40
40
|
|