Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to change Tab bar background color

I am using BottomTabNavigator in my project I am unable to change the color of the Tab it's being in default color although I am trying to change the style background color. Following is the code I am using, even the tintcolors also not getting changed. I am attaching the screenshots of the page. I want to change the color of the bar where the icons present.enter image description here.

{
      tabBarPosition: 'bottom',
      tabBarOptions: {
               activeTintColor: 'blue',
          inactiveTintColor: 'grey',
          style: {
            backgroundColor: 'darkcerulean',
            },
            labelStyle: {
              fontSize: 13,
          },

      }
}

Can someone help me with that ?

Thanks in advance.

like image 675
Nishar sheik Avatar asked Aug 09 '18 10:08

Nishar sheik


1 Answers

use it example:

 export default createBottomTabNavigator({
      home: {
        screen: HomeScreen,
        navigationOptions: ({ navigation }) => ({ 
          title: 'Home'
        })
       }, 
      }, 
     {
        initialRouteName: "home",
        tabBarOptions: {
          style: {
           height: 55,
           backgroundColor: '#8e7e7e'
          }
        }
     });
like image 195
Gurbela Avatar answered Sep 29 '22 09:09

Gurbela