1

@react-navigation/material-bottom-tabs在我的 react-native 应用程序中使用。如何增加图标之间的空间并根据设备的宽度平均对齐它们。

react-native: 0.62.1 @react-navigation/native: ^5.1.5 @react-navigation/material-bottom-tabs: ^5.1.8

当前行为

底部标签栏的右侧和左侧留有更多空间,我无法在图标之间平均对齐空间。样本

预期行为

我正在使用材料底部选项卡,我想增加材料底部选项卡中的一个图标和另一个图标之间的空间(或)平均对齐图标空间。

在此处输入图像描述

4

1 回答 1

0

<Tab.Navigator
  initialRouteName="Home"
  activeColor="#f0edf6"
  inactiveColor="#3e2465"
  barStyle={{ backgroundColor: '#694fad' }}
>
  {/* ... */}
</Tab.Navigator>

There is a prop like barStyle, you can add your custom styles for your tab navigator. Hope this will fix your issue.


于 2020-04-12T15:29:37.773 回答