I want to remove the Icon space/View from the Bottom tab Navigator. I tried to remove the Icon by removing tabBarIcon but it didn't work. Here is the code I tried and the outcome I received. It is not looking that good, the label is not at the center. They looks like they have gone below the visible screen. Code used:
const TabNavigator = createMaterialBottomTabNavigator(
{
Home: {
screen: screen1,
navigationOptions: {
// tiitle: "hello"
// tabBarIcon: () => {
// <View></View>
// },
tabBarLabel: <Text style={{ fontSize: 15, textDecorationLine: 'underline', }}>Screen1</Text>,
}
},
People: {
screen: screen2,
navigationOptions: {
tabBarLabel: <Text style={{ fontSize: 15, textDecorationLine: 'underline' }}>Screen2</Text>,
activeColor: '#E8947F',
inactiveColor: '#C4C9CB',
}
},
Connects: {
screen: screen3,
navigationOptions: {
tabBarLabel: <Text style={{ fontSize: 15, textDecorationLine: 'underline' }}>Screen3</Text>,
activeColor: '#E8947F',
inactiveColor: '#C4C9CB',
// barStyle: { backgroundColor: '#2c6d6a' },
}
},
},
{
initialRouteName: 'Home',
activeColor: '#E8947F',
inactiveColor: '#C4C9CB',
barStyle: { backgroundColor: '#00000000' },
});
Outcome:
I am new to React-Native. Please help me.