努力了解如何更改导航标题栏背景颜色。我正在使用反应导航和 Expo 来构建我的应用程序。
backgroundColor
似乎什么也没做。知道怎么做吗?
我的代码如下:
static navigationOptions = () => ({
title: 'My App',
headerTintColor: Colors.DarkBlue,
backgroundColor: 'red',
headerLeft:
<HeaderBarItem to='InfoScreen' title='App info' />,
headerRight:
<HeaderBarItem to='FeedbackScreen' title='Feedback' />
});
原文由 arled 发布,翻译遵循 CC BY-SA 4.0 许可协议
这应该有效: