我正在使用@react-navigation/bottom-tabs V6。我正在尝试在底部设置透明背景。到目前为止,我无法弄清楚该怎么做。有任何想法吗?到目前为止的结果:
到目前为止的代码:
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
const theme = {
colors: {
background: "transparent",
},
};
<NavigationContainer theme={theme}>
<Tab.Navigator
screenOptions={{ headerShown: false }}
tabBarOptions={{
style: {
backgroundColor: 'transparent',
borderTopWidth: 0,
elevation: 0,
}
}}
>
<Tab.Screen
name="HomeNavigation"
component={HomeNavigation}
options={{
tabBarLabel: "Home",
tabBarIcon: ({ color, size }) => <Icon />,
}}
/>
<Tab.Screen name="Home" component={Home} />
</Tab.Navigator>
</NavigationContainer>
我怎样才能摆脱这个背景?