#E9E9EF
,我不知道它来自何处。我发现这种颜色是在React-Navigation/lib/views/cardstack/card.js中设置的。 我试图更改视图背景颜色,但没有用
return (
<View style={{backgroundColor: '#F5FCFF'}}>
</View>
)
我还试图在stacknavigator中使用此代码更改卡样式,而颜色没有更改
Other: {
screen: AppOtherContainer,
cardStyle: {backgroundColor: 'red'},
navigationOptions: ({navigation}) => ({
title: navigation.state.params.title
})
}
tintColor
static navigationOptions = {
title: navigation.state.params.title,
header: navigation => ({
titleStyle: {
color: '#FFFFFF'
},
tintColor: '#F5FCFF'
})
}
如果您想更改标题颜色,然后尝试此操作。
如果您想更改渲染的屏幕的背景颜色,然后设置
<View style={{backgroundColor: 'red', flex:1}}> </View>