我想从底部选项卡导航器中删除图标空间/视图。我尝试通过删除 tabBarIcon 来删除图标,但它不起作用。这是我尝试过的代码和我收到的结果。看起来不太好,标签不在中心。他们看起来好像已经进入了可见屏幕下方。使用的代码:
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' }, …Run Code Online (Sandbox Code Playgroud)