Reputation: 1
OK, I choose react-navigation , so I write a demo
create a sample screen named PageScreen
create a TabNavigator
export const MainScreenNavigator = TabNavigator({
PageScreen: {screen: PageScreen, navigationOptions: { title: 'page1' }},
PageScreen1: {screen: PageScreen, navigationOptions: { title: 'page2' }}
})
this is the result:
(result TabNavigator fill Horizontal)
my questions is :
A: if my two screen links the same page , but I want to use a params to differentiate. for example if page1 ,PageScreen show page1 ,if page2 show page2. I don't find the method to pass param
B: in some apps , navigation not fill Horizontal navigation is short not fill-x
How to modify navigation's style ?
Upvotes: 0
Views: 296
Reputation: 373
You should custom your navigation according to here: https://reactnavigation.org/docs/navigators/custom
then you could have you own tab view style which fit your requirement
If you are looking for example you could check the official example code in github: https://github.com/react-community/react-navigation/blob/master/examples/NavigationPlayground/js/CustomTabs.js
Upvotes: 1