skip to Main Content

On Long Press, getting grey background and it's overriding orange color
Clicking on Privacy Policy

Problem: Grey Background when clicking/Long Press on items.

Requirement: How to change grey background to orange color when I press items?

<Drawer.Navigator
            drawerContent={(props)=><CustomDrawer {...props}/>}
            screenOptions={
                {
                    drawerStyle:{
                        width:300,
                        borderBottomEndRadius:15,

                    },
                    drawerLabelStyle:{
                        fontSize:18,
                        marginLeft:-10,
                        
                    },
                    drawerItemStyle:{
                        marginLeft:0,
                        marginRight:0,
                        paddingLeft:10
                        
                    },
                    drawerActiveBackgroundColor:'orange',
                    drawerActiveTintColor:'black',
                }
            }
        >

2

Answers


  1. <Drawer.Navigator
            drawerContentOptions={{
              activeTintColor: 'red',
              activeBackgroundColor: 'grey',
              inactiveTintColor: 'blue',
              inactiveBackgroundColor: 'white',
              labelStyle:{
                fontSize: 15,
                marginLeft:5
              }
            }}>
    </Drawer.Navigator>
    

    also follow the link
    https://github.com/react-navigation/react-navigation/issues/9079

    Login or Signup to reply.
  2. I suggest you to try this.

    <Drawer.Navigator 
    screenOptions={{
    drawerActiveBackgroundColor: ‘orange’
    drawerActiveTintColor: ‘fff’
    drawerInactiveTintColor: ‘#333’
    }}
    >
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search