【问题标题】:Hiding Label in Tab in React Native Navigation在 React Native Navigation 中的选项卡中隐藏标签
【发布时间】:2020-08-28 06:58:04
【问题描述】:

在我的 react native 选项卡中隐藏标签时遇到问题。我正在使用react-navigation/material-bottom-tabs.

请看下面我的代码

 <Tab.Navigator
        initialRouteName="Requests"
        backBehavior="initialRoute"
        shifting={true}
        activeColor={theme.colors.primary}
        inactiveColor={color(theme.colors.text).alpha(0.6).rgb().string()}
        sceneAnimationEnabled={false}
        showLabel={false}
      >
        <Tab.Screen
          name="Requests"
          component={Requests}
          options={{
            tabBarIcon: "comment-question-outline",
            tabBarColor,
          }}
        />
        ...
  </Tab.Navigator>

【问题讨论】:

    标签: reactjs react-native react-navigation react-navigation-bottom-tab


    【解决方案1】:

    它的labeled={false}不是showLabel={false}

     <Tab.Navigator
            initialRouteName="Requests"
            backBehavior="initialRoute"
            shifting={true}
            activeColor={theme.colors.primary}
            inactiveColor={color(theme.colors.text).alpha(0.6).rgb().string()}
            sceneAnimationEnabled={false}
            labeled={false}
          >
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 1970-01-01
      • 2020-09-17
      • 2020-06-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多