触摸导航栏外部会调用 click 方法

问题描述 投票:0回答:1

我的导航栏有问题,如果屏幕上的某个元素不可单击,那么当您单击它时,屏幕会打开,就像从下面单击导航栏一样。我在我的容器屏幕上使用了 marginBottom。

    return (<Tab.Navigator
    tabBarStyle={{position: 'absolute',
    bottom: 0,
    width: '100%',
    backgroundColor: '#F8F7FB',
    borderRadius: 30,
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center'}}
    screenOptions={{
        headerShown: false,
        activeTintColor: '#000000',
        activeBackgroundColor: '#E2E2E2',
        inactiveBackgroundColor: '#ffffff',
        labelStyle: {
            fontFamily: 'Rubik_400Regular',
            fontStyle: "bold",
            fontSize: 13,
            color: '#181725',
        },
    }}>
    <Tab.Screen
        name="ScreenTabMain"
        options={{

我尝试 marginBottom 和 useBottomTabBarHeight() 但没有解决。 ios 和 android 都有这个问题

react-native expo react-navigation-bottom-tab
1个回答
0
投票

请同时提供屏幕代码,您的选项卡导航器对我来说似乎很好。

© www.soinside.com 2019 - 2024. All rights reserved.