我尝试使用https://github.com/xotahal/react-native-material-ui中的标志,但该元素未正确适合底部导航:
这是AppNavigator.js中的代码:
import { createMaterialBottomTabNavigator } from "react-navigation-material-bottom-tabs";
import { Badge, Icon, Avatar } from "react-native-material-ui";
export const SignedIn = createMaterialBottomTabNavigator(
{
MeetingsScreen: {
screen: MeetingsScreen,
navigationOptions: {
tabBarLabel: "Заседания",
tabBarIcon: ({ focused }) => (
<Badge text="3">
<TabBarIcon
focused={focused}
name={
Platform.OS === "ios"
? `ios-people${focused ? "" : "-outline"}`
: "md-people"
}
/>
</Badge>
)
}
},
...
我尝试将TabBarIcon自身包装到徽章中,但没有帮助。 如何正确设置此元素?还是有一个更好的库?