如何更改React Navigation v5中出现在BottomTab后面的背景颜色?

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

我想创建具有边框半径的BottomTab,但是在我的标签后面显示背景颜色(白色),但我不知道如何删除或更改它:

White space in corners

我找到了'解决方案':

tabBarOptions={{
        showLabel: false,
        activeTintColor: theme.primary,
        inactiveTintColor: theme.tintInactiveTabBar,
        style: {
          backgroundColor: theme.backgroundTabBar,
          position: 'absolute',
          left: 0,
          bottom: 0,
          right: 0,
          borderTopWidth: 0,
          borderTopRightRadius: 10,
          borderTopLeftRadius: 10,
          height: 60,
          elevation: 0,
        },
      }}

但是设置位置:绝对还有另一个问题:在ScrollViews中看不到所有内容:

enter image description here

我尝试在te容器中设置填充或边距,但不起作用。

react-native react-navigation
1个回答
0
投票

尝试一下:

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