React Native Navigation Hybrid Versions Save

React Native Navigation that supports seamless navigation between Native and React.

v2.16.0

11 months ago
  • 优化延迟初始化 ReactRootView

v2.14.0

1 year ago

Android specific

v2.13.0

1 year ago
  • 添加 statusBarHeight()toolbarHeight()topBarHeight() 几个方法用来获取状态栏、工具栏、顶部栏的高度

    import { statusBarHeight, toolbarHeight, topBarHeight } from 'hybrid-navigation'
    
  • 标记 GardenReactRegistry 为弃用,使用 Navigation 对象对应的方法代替

    import Navigation from 'hybrid-navigation'
    import App from './App'
    
    Navigation.registerComponent('App', () => App)
    
  • 标记 Navigator 中的大部分静态方法为弃用,使用 Navigation 对象对应的方法代替

    import Navigation from 'hybrid-navigation'
    
    Navigation.setRoot({})
    
  • 处理了切换页面时,TextInput 自动获取焦点弹出键盘导致的问题

v2.12.0

1 year ago
  • 给 Modal 添加淡入淡出动画

v2.9.0

2 years ago
  • 调整传递给 ReactRegistry.startRegisterComponentHOC 的使用顺序,现在可以通过以下方式全局设置页面特定属性:

    ReactRegistry.startRegisterComponent(withNavigationItem({ topBarHidden: true }))
    

    ⚠️ 实现 HOC 时,注意传递 props 给被包裹的组件,以及注意复制 navigationItem 这个静态属性,如

    export function withRedux(WrappedComponent: ComponentType<any>) {
      return class ReduxProvider extends React.Component {
        // 注意复制 navigationItem
        static navigationItem = (WrappedComponent as any).navigationItem
    
        static displayName = `withRedux(${WrappedComponent.displayName})`
    
        render() {
          return (
            <Provider store={store}>
              // 注意传递 props 属性
              <WrappedComponent {...this.props} />
            </Provider>
          )
        }
      }
    }
    

v2.8.0

2 years ago
  • 添加 forceTransparentDialogWindow 配置项,用于设置当页面是 Dialog 时,是否强制背景透明

Android specific

  • 移除 topBar 和 bottomBar 的 ripple 效果

v2.7.0

2 years ago

Android specific

  • 支持 appcompat 1.3

v2.5.0

2 years ago
  • 添加 Garden#setTabItem,可以动态修改 tab 图标,标题,徽章。

  • 弃用 Garden#setTabIcon

  • 弃用 Garden#setTabBadge

v2.3.0

2 years ago

iOS specific

  • 支持和 react-native-gesture-handler 一起使用

    如果需要支持 react-native-gesture-handler, 需要按如下方式修改 AppDelegate.m 文件

    RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
    [[HBDReactBridgeManager get] installWithBridge:bridge];
    
  • 添加 homeIndicatorAutoHiddenIOS 配置项,仅对页面可设置,可以动态变更,用于隐藏该页面的 Home 指示器

v2.2.0

2 years ago

Android specific

  • 支持隐藏虚拟导航栏

    navigationBarHiddenAndroid 默认为 false,仅对页面可设置,可以动态变更

  • 支持 Android 9 及以上,设置横屏时,是否将页面延伸至开口区域

    displayCutoutWhenLandscapeAndroid 默认为 true,可以全局设置,也可仅针对某页面设置。