listenzz / hybrid-navigation Goto Github PK
View Code? Open in Web Editor NEWReact Native Navigation that supports seamless navigation between Native and React.
License: MIT License
React Native Navigation that supports seamless navigation between Native and React.
License: MIT License
RN 增加配置项,用于配置 drawer menu 的宽度
可以在 navigationItem 中绑定按钮的回调
await this.props.navigation.pop()
await this.props.navigation.push('A')
场景:
一个RN页(A) ,之后push一个Native页面(B),再push一个RN页面(C)。
一共三个页面,因为Native页(B)做push的时候,无法传递popToId给RN页(C),RN页(C)无法感知。
因此,无法PopTo Last but one.
图片是图案,不是单色
Could not find class 'me.listenzz.navigation.AppUtils$1', referenced from method me.listenzz.navigation.AppUtils.setStatusBarTranslucent
Navigation.setRoot({
tabs: [
{
stack: {
screen: {moduleName: 'LIst'},
},
},
{
stack: {
screen: {moduleName: 'Detail'},
},
}....
xcrun simctl openurl booted hbd://Detail ---->not show details
StatusBar.setHidden(true) �生效了,但是状态栏那个位置始终有个色块,正常的状态栏确实隐藏了,下拉一下可以拉下来。
react-native-navigation-hybrid 版本是0.7.14.
android版本有这个问题。 ios 没有
1.如果 icon 用的是图片,如何控制这个 icon 的大小? 现在tabItem的图片不知道为什么,显示超大,如图所示
2.如果leftBarButtonItem的 icon 也设置了图片,标题会消失,如上图所示:
3.leftBarButtonItem中的按钮 如果是第一次点击,会有个很明显的点击效果,但是之后再点击,不知道为什么这个点击效果就很不明显了。如下图所示。
4.横屏后 头部和尾部与竖屏的时候表现似乎不一致? 如下图所示
以下是代码
static navigationItem = {
titleItem: {
title: 'RN navigation',
},
leftBarButtonItem: {
title: 'SETTING',
action: navigation => {
console.info('setting button is clicked.');
},
icon: Image.resolveAssetSource(require('../images/house.png')),
},
topBarColor: '#FF0000',
tabItem: {
title: '组件',
icon: Image.resolveAssetSource(require('../images/house.png')),
// inactiveIcon: { uri: 'blue_solid', scale: PixelRatio.get() },
hideTabBarWhenPush: true,
},
};
Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
隐藏导航栏,背景颜色,透明度变化,自定义控件
没见说明里有提到 是否支持?比如安卓的和苹果我想都从右到往左的打开页面
react navigation中在根视图上有个 onNavigationStateChange,react-native-navigation-hybrid没有根视图实现这个是要注册监听么 有计划实现这个么 https://reactnavigation.org/docs/en/screen-tracking.html
有一个需求就是节假日的时候需要替换tab栏的图片,能否提供一个方法修改tab的图片 和选中状态图片
新手,好难啊,link没用,按照配置改了还是不行
有需求要知道是否当前页面出现,React Native Navigation中类似iOS中的生命周期方法
didAppear() {
this.setState({ text: 'didAppear' });
}
didDisappear() {
alert('didDisappear');
}
React Navigation中则是加入了监听
this._navListener = this.props.navigation.addListener('didFocus', () => {
StatusBar.setBarStyle('light-content');
isAndroid && StatusBar.setBackgroundColor('#6a51ae');
});
感觉做成生命周期比较好
之前一直在用react-navigation,不过在低端安卓机子上反应总有点慢半拍,
这几天对比了下 react-native-navigation-hybrid和react-native-navigation,
决定新项目还是选择用react-native-navigation-hybrid,但是尝试结合 dva.js 来使用总是弄不成功,能否在playground中写个结合的例子?
https://github.com/nihgwu/react-native-dva-starter 这个是react-navigation和 dva 结合的例子
tabItem: {
// 底部 TabBarItem 可配置项
title: 'Style',
icon: Image.resolveAssetSource(require('../../images/tabHomeActive.png')),
inactiveIcon: Image.resolveAssetSource(require('../../images/tabHomeInactive.png')),
hideTabBarWhenPush: true,
},
这里有可以设置宽高或者缩放的属性么?
render() {
const { value, onIncreaseClick } = this.props;
return (
);
}
就是这个scrollview要padding这个tabbar的高度 这个布局只能做成这样还是bug? 不知道我描述的清楚么?
有需求需要覆盖整个屏幕下去创建视图,这个是不是只能借助原生插件实现了?
static navigationItem = { backInteractive: true, swipeBackEnabled: true }
现在文档中只看到设置iconfont 能否增加设置image的属性可以设置网络或本地图片,有一个inactiveImage 一个activeImage
类似于https://github.com/instea/react-native-popup-menu/ 这个组件是不是注册根视图就跟redux的这个例子类似?
function screenWrapper(screenProvider) {
const Screen = screenProvider();
return props => (
<Screen {...props} />
);
}
ReactRegistry.startRegisterComponent(screenWrapper);
最好能在playground中写个例子 谢谢~
node_modules/react-native-navigation-hybrid/android/src/main/java/com/navigationhybrid/ReactFragment.java:115: 错误方法不会覆盖或实现超类型的方法
@OverRide
就我所知,大部分的react native app都在用react-native-push-notification,但由於wix/react-native-navigation的android不支持到,必需用另一個wix/react-native-notifiction。可惜,wix/react-native-notifiction應用很差,有很多bugs。所以如果能為react-native的navigation生態做出native的解決方案而又可用到react-native-push-notification就最好喔!!
感謝!
不同页面状态栏可以有不同样式
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.