android - 反应导航 5 tabBarBadgeStyle 不起作用
问题描述
我react-navigation-5
在我的 中使用,react-native app
我使用创建了一个底部选项卡@react-navigation/material-bottom-tabs
。我在其中一个选项卡中添加了一个徽章,我tabBarBadge
为此使用了属性,它工作正常。我需要更改徽章color
,background colour
为此我使用tabBarBadgeStyle
了但它不起作用,
<Tab.Screen
options={{
tabBarBadge:88,
tabBarBadgeStyle:{backgroundColor:'#fff'}
}}
/>
请帮我实施tabBarBadgeStyle
解决方案
https://reactnavigation.org/docs/themes/
const MyTheme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
notification: 'red',
},
}
和
<NavigationContainer theme={MyTheme}>
...
</NavigationContainer>
推荐阅读
- python - 如何在执行轮廓检测后画圆
- sql-server - 列名“id”无效 - 这是我尝试从表中选择特定列时的错误
- python - 根据pandas Dataframe中的多列替换多列值
- xcode - 应用商店连接错误:ITMS-90683:Info.plist 中缺少目的字符串 -
- sql-server - 当 Select distinct From Features 给出错误 ORDER BY 项目必须出现在选择列表中?
- html - textarea 背景颜色与 body 不同(略暗)
- python - 如何设置二维数组中某些元素的值,它们的位置在 numpy 列表中?
- css - 有没有办法使用自定义图标进行材质ui的分页
- c# - 使用最小起订量进行 SqlQuery() 测试的 DbContext 模拟 - 数据库中已经有一个名为“public”的对象
- python - 在全局声明之前分配名称“运行”