indicatorStyle 不适用于本机反应

时间:2021-04-07 11:04:30

标签: react-native-android tabview

我正在尝试稍微自定义 tabView,但我无法更改指示器条中活动选项卡的颜色。 请帮忙。

 <TabView style={{marginTop:0}}
      indicatorStyle={{ backgroundColor: '#3090C7',
      borderRadius: 24}}
      navigationState={{ index, routes }}
      renderTabBar={props => (
        <TabBar
          {...props}
          renderLabel={({ route}) => (
            <Text style={{ color:"black", margin: 8, fontWeight:"bold", fontFamily:"sans-serif", fontSize:16}}>
              {route.title}
            </Text>
          )}
          style={{backgroundColor: 'white'}}
        />
      )}
      renderScene={renderScene}
      onIndexChange={setIndex}
    />

0 个答案:

没有答案