努力了解如何更改导航标题栏的背景颜色。我正在使用反应导航和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' />
});
这应该工作:
static navigationOptions = () => ({
title: 'My App',
headerTintColor: Colors.DarkBlue,
headerStyle: {
backgroundColor: 'red'
},
headerLeft:
<HeaderBarItem to='InfoScreen' title='App info' />,
headerRight:
<HeaderBarItem to='FeedbackScreen' title='Feedback' />
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句