React-native-router-flux: No option to change default indicator style color of yellow in Tab bar on android

Created on 2 Aug 2017  路  3Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0.beta 15 (v3 is not supported)
  • react-native v0.45.1

Expected behaviour

Indicator style changes to color #de1d3e

Actual behaviour

The default indicator style of yellow is not changed based on my code.

Steps to reproduce

I followed react-navigation documentation at https://github.com/react-community/react-navigation/blob/master/docs/api/navigators/TabNavigator.md .

<Scene key="tabbar"  tabBarStyle={styles.tabBarStyle} tabBarPosition={'top'} {...sceneConfig} hideNavBar tabs={true}  >


tabBarStyle: {
        backgroundColor: '#eeeeee',
        indicatorStyle : {
            color: '#de1d3e'
        },
    },

Most helpful comment

It uses a separate styling : See below

<Scene tabs indicatorStyle={styles.indicatorStyle} tabBarStyle={styles.tabBarStyle}/>

const styles = {
 tabBarStyle: {
        backgroundColor: '#eeeeee',
},
indicatorStyle:{
    backgroundColor:'#de1d3e'
  },
};

All 3 comments

It uses a separate styling : See below

<Scene tabs indicatorStyle={styles.indicatorStyle} tabBarStyle={styles.tabBarStyle}/>

const styles = {
 tabBarStyle: {
        backgroundColor: '#eeeeee',
},
indicatorStyle:{
    backgroundColor:'#de1d3e'
  },
};

I just tried that and it doesn't seem to work.

it's work for me
const tabMaterial = createMaterialTopTabNavigator( { option1: Option1Screen, option2: Option2Screen }, { tabBarOptions: { indicatorStyle: { backgroundColor: "#ffffff" } } } );

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vinayr picture vinayr  路  3Comments

jgibbons picture jgibbons  路  3Comments

YouYII picture YouYII  路  3Comments

rafaelcorreiapoli picture rafaelcorreiapoli  路  3Comments

tonypeng picture tonypeng  路  3Comments