Я хочу отобразить нижние вкладки в стековом навигаторе, и это мой код:
const todosScreen = {
screen: TodosScreen,
navigationOptions: ({ navigation }) => ({
header: null,
title: navigation.state.routeName
})
};
const BottomTabs = createBottomTabNavigator({
All: todosScreen,
Active: todosScreen,
Complete: todosScreen
});
const AppNavigator = createStackNavigator(
{
Home: {
screen: BottomTabs
}
},
{
initialRouteName: 'Home',
defaultNavigationOptions: {
headerStyle: {
backgroundColor: '#f4511e',
alignSelf: 'center',
textAlign: 'center'
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
textAlign: 'center',
alignSelf: 'center',
flex: 1
}
}
}
);
К сожалению, стекавигатор отображает только белый фон сверху, я думаю, стили заголовка не действуют?Интересно, что может быть причиной и исправить?