How can I hide bottom animated tabbar navigator?

I want to hide bottom tabbar on product details page. Bottom tabbar should appear only on home, profile and orders screen, not on product details page and also not on product image details screen.

Below is my code:

I used this animated tabbar import { AnimatedTabBarNavigator } from "react-native-animated-nav-tab-bar";

here is the code:

const Tabs = AnimatedTabBarNavigator();


const AppNavigator = () => (

<Tabs.Navigator
tabBarOptions={{
  activeTintColor: colors.white,
  inactiveTintColor: colors.primary,
  activeBackgroundColor : "#3f5393",           
}}
initialRouteName={"Home"}
appearance={{
    tabBarBackground : colors.primary,
    topPadding : 10,
    horizontalPadding : 10,
    dotCornerRadius : 8,
    dotSize : 'small'
}}
>
<Tabs.Screen
  name="My Orders"
  component={MyorderStack}
  options={{
    tabBarIcon: ({ focused, color, size }) => (
        <Image
            source={require('../assets/order.png')}
            style={{
                width : 20,
                height : 20
            }}
            color={ colors.primary}
            
        />
    )
  }}
  
/>    
<Tabs.Screen
  name="Home"
  component={HomeScreenStack}
  options={{
    tabBarIcon: ({ focused, color, size }) => (
        <Image
            source={require('../assets/home.png')}
            style={{
                width : 20,
                height : 20
            }}          
        />
    ),
   headerShown : true 
  }}

/>

<Tabs.Screen
  name="Profile"
  component={ProfileStack}
  options={{
    tabBarIcon: ({ focused, color, size }) => (
        <Image
            source={require('../assets/profile.png')}
            style={{
                width : 20,
                height : 20
            }}
            color={focused ? color : colors.primary}
        />
    )
    
  }}
  appearance ={{
      topPadding : 0
  }}
/>

</Tabs.Navigator>)


Read more here: https://stackoverflow.com/questions/68464392/how-can-i-hide-bottom-animated-tabbar-navigator

Content Attribution

This content was originally published by John Ocean at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: