【问题标题】:inActiveTintColor not working in tabbar react nativeinActiveTintColor 在标签栏中不起作用反应本机
【发布时间】:2021-04-07 18:25:22
【问题描述】:

我正在使用这个库:

https://www.npmjs.com/package/react-native-animated-nav-tab-bar

我写过这样的代码:

const Tabs = AnimatedTabBarNavigator();

function Tabbar1(props) {

    return (

        <Tabs.Navigator
            tabBarOptions={{
                activeBackgroundColor: "#ff00ff",
                inactiveBackgroundColor: '#000000',
                activeTintColor: '#ffffff',
                inactiveTintColor: '#000000',
                showIcon: true,
            }}
        >
            <Tabs.Screen
                name="Dashboard"
                component={Dashboard}
            />
            <Tabs.Screen
                name="Services"
                component={Services}
            />
            <Tabs.Screen
                name="Notification"
                component={Notification}
            />
            <Tabs.Screen
                name="More"
                component={More}
            />
        </Tabs.Navigator>

    );
}

export default withNavigation(Tabbar1)

但是 inactiveBackgroundColor 或 inactiveTintColor 在这里不起作用,

那么谁能帮我解决这个问题?

提前致谢。

【问题讨论】:

    标签: android react-native tabbar


    【解决方案1】:

    当我检查存储库时,我发现没有 inactiveBackgroundColor 功能。如果你去掉这个功能并使用不同的颜色,也许你可以探索一下。此外,如外观道具中所述,tabBarBackground 的默认设置为“白色”。你必须改变它来做你想做的事。

    【讨论】:

      猜你喜欢
      • 2021-09-06
      • 1970-01-01
      • 2021-12-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-04
      • 1970-01-01
      • 2016-07-20
      相关资源
      最近更新 更多