I’m working on a React Native project where I use a bottom tab navigator.
When I open the keyboard on a page without the bottom tab, and then navigate back to a tab navigator page using a gesture, the bottom tab shifts up by the height of the keyboard.
I used
- react-native: “0.72.10”,
- react-native-screens: “^3.22.1”,
- @react-navigation/bottom-tabs: “^6.5.11”,
Use this property tabBarHideOnKeyboard
Bottom Tabs Navigator : https://reactnavigation.org/docs/bottom-tab-navigator/
<Tab.Navigator
initialRouteName="Wifi"
screenOptions={{
tabBarActiveTintColor: Config.themeColor,
tabBarHideOnKeyboard : true,
tabBarInactiveTintColor: 'lightgray',
headerTintColor: '#fff',
headerStyle: {
backgroundColor: Config.themeColor,
},
tabBarStyle:{backgroundColor:Config.themeColor}
}}>