【发布时间】:2020-08-25 16:05:39
【问题描述】:
我可以更改材料底部标签中徽章的颜色吗?因为默认情况下它已经是红色的,我需要更改它。如果可以,我该怎么做?
...
import {createMaterialBottomTabNavigator} from '@react-navigation/material-bottom-tabs';
...
const MainBottomTab = createMaterialBottomTabNavigator();
...
<MainBottomTab.Navigator
initialRouteName="Home"
activeColor="#C9C9C9"
inactiveColor="#4523AF"
barStyle={styles.menuBotao}>
...
<MainBottomTab.Screen
name="Publicações"
component={PublicacaoNavication}
options={{
tabBarLabel: '',
tabBarBadge: notificacoes !== undefined ? notificacoes.length : false, <-- I need to change the color
tabBarIcon: ({color}) => <Icon name={'filing'} color={color} />,
}}
/>
...
</MainBottomTab.Navigator>
...
【问题讨论】:
标签: android react-native react-navigation