首页 > 解决方案 > indicatorStyle 在本机反应中不起作用

问题描述

我正在尝试稍微自定义 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}
    />

标签: react-native-androidtabview

解决方案


推荐阅读