我正在使用React Native和react-native-router-flux创建一个小型Android移动应用程序。
我已经定制了除主屏幕的leftTitle
和rightTitle
属性之外的所有内容。我可以说出他们的名字,但我不能给他们打造。它们保持这种蓝色,如下图所示。
这是该场景的代码:
<Scene
rightTitle="Add"
onRight = { () => Actions.employeeCreate() }
key="employeeList"
component={EmployeeList}
title="Employees"
leftTitle="Log Out"
onLeft={ () => logUserOut() }
initial
/>
有谁知道如何更改标题文字的颜色?
谢谢!
react-native-router-flux
中找到node modules
文件夹react-native-router-flux > src > NavBar.js
barRightButtonText
和barLeftButtonText
对于右键文字:
barRightButtonText: {
color: 'rgb(0, 122, 255)', //Your rgb color code here
textAlign: 'right',
fontSize: 17,
},
对于左键文字
barLeftButtonText: {
color: 'rgb(0, 122, 255)', //Your rgb color code here
textAlign: 'left',
fontSize: 17,
},