Sam*_*Rao 0 react-native react-navigation
我正在尝试将标题的字体颜色从黑色更改为白色。无法做到。我在代码中有以下内容:
navigationOptions: {
title: 'PRACTICIA',
headerLeft: null,
headerStyle: {
backgroundColor: '#33ACDE',
color: 'white'
}
}
}
Run Code Online (Sandbox Code Playgroud)
我得到以下结果(黑色)。
中定义的样式headerStyle将应用于标题<View />。
要将样式应用于标题,必须headerTitleStyle按照StackNavigator文档中的说明使用。
navigationOptions: {
title: 'PRACTICIA',
headerLeft: null,
headerStyle: {
backgroundColor: '#33ACDE'
},
headerTitleStyle: {
color: 'white'
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1452 次 |
| 最近记录: |