【问题标题】:How do I change the text color and highlighted color in the react native drawer navigation如何在反应原生抽屉导航中更改文本颜色和突出显示的颜色
【发布时间】:2021-03-09 08:38:40
【问题描述】:

我可以更改背景颜色,但无法更改文本和突出显示的颜色。我怎么能附上我的代码和屏幕截图。

    <NavigationContainer>
      <Drawer.Navigator 
      drawerStyle={{
        backgroundColor: '#b7657b',
      }}
      initialRouteName="Home">
        <Drawer.Screen name="Anasayfa" component={Home} />
        <Drawer.Screen name="Kullanım" component={dnm} />
        <Drawer.Screen name="Hakkımızda" component={info} />
        <Drawer.Screen name="hsc" component={hsc} />
      </Drawer.Navigator>
      </NavigationContainer>

【问题讨论】:

标签: android reactjs react-native


【解决方案1】:

试试这个方法

<Drawer.Navigator
        drawerContentOptions={{
          activeTintColor: 'red',
          activeBackgroundColor: 'grey',
          inactiveTintColor: 'blue',
          inactiveBackgroundColor: 'white',
          labelStyle:{
            fontSize: 15,
            marginLeft:5
          }
        }}>
</Drawer.Navigator>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-23
    • 2020-08-30
    • 1970-01-01
    相关资源
    最近更新 更多