Skip to content

activeTintColor and inactiveTintColor do not work #1388

@zakster12

Description

@zakster12

I would like to use the activeTintColor and inactiveTintColor for a tab but it doesn't take any effect. My code:

class TabOneNavigation extends React.Component {
	static navigationOptions = {
		title: Strings.getTickets,
		headerTitleStyle: [NavBarTitleStyle.title, { color: Colors.black }],
		headerStyle: { backgroundColor: 'white' },
		tabBarLabel: 'Get ticket',
		tabBarIcon: ({ tintColor }) => (
			<TabBackIcon
				type={'profile'}
				tintColor={{ tintColor }}
			/>
		),
		tabBarActiveTintColor: 'red',
		tabBarInactiveTintColor: 'green',
	};
       ...
}

These are working:

tabBarLabel: 'Get ticket',
tabBarIcon: ({ tintColor }) => (
	<TabBackIcon
		type={'getTicket'}
		tintColor={{ tintColor }}
	/>
),

but these do not work:

tabBarActiveTintColor: 'red',
tabBarInactiveTintColor: 'green',

I also tried the old way but it's the same:

activeTintColor: 'red',
inactiveTintColor: 'green',
software version
react-navigation 1.0.9
react-native 0.43

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions