Closed emalorenzo closed 6 years ago
Do you mean by sliding this behavior?
If so, you can turn that off with shifting={false}
, see https://github.com/timomeh/react-native-material-bottom-navigation#bottomnavigation
If it is the swiping between tabs that you are talking about, you can configure that in your TabNavigatorConfig like this:
const MyApp = TabNavigator({
MoviesAndTV: { screen: MoviesAndTV },
Music: { screen: Music },
Newsstand: { screen: Newsstand }
}, {
tabBarComponent: NavigationComponent,
tabBarPosition: 'bottom',
tabBarOptions: {...}
// add this, ref from docs: swipeEnabled - Whether to allow swiping between tabs.
swipeEnabled: false,
// optional, animationEnabled - Whether to animate when changing tabs.
animationEnabled: false,
})
The swipeEnabled set to false means that you no longer can swipe between the tabs, and animationEnabled set to false means that there won't be a swipe animation between tab switches, even when using the tab buttons.
Thanks @waquidvp ! That was what i was looking for .
Discussion / Feature Request
A core difference between Tabs and BottomNavigation is the fact that they cant slide between each other. There is a way to prevent this behaviour?
Thanks in advance for all your effort!