Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Change active tab underline color #578

Closed
adnxy opened this issue Aug 8, 2018 · 4 comments
Closed

Change active tab underline color #578

adnxy opened this issue Aug 8, 2018 · 4 comments

Comments

@adnxy
Copy link

adnxy commented Aug 8, 2018

Current behaviour

When I switch between tabs, my underline color changes but it disappears when I'm done with pressing tab.

Expected behaviour

I would like to have green underline color of active tab, that will stay there until next tab is clicked

Code sample

renderHeader = (props) => {
return (<TabBar
{...props}
tabStyle={styles.tabBarStyle}
labelStyle={styles.tabBarHeader}
indicatorStyle={styles.tabBarIndicator}
style={styles.tabBar}
data={this.props}
animationEnabled={false}
pressColor={'green'}
/>);
}

renderScene = SceneMap({
first: FirstRoute,
second: SecondRoute,
third: ThirdRoute,
});

Your Environment

| react-native |
| react-native-tab-view |
| ios |
| npm |

@jeprojects
Copy link

Is there an issue with styling the tab bar?

    <TabBar
      {...props}
      pressColor="rgba(179,229,255, 0.5)"
      scrollEnabled={true}
      style={styles.tabbar}
      indicatorStyle={styles.indicator}
      tabStyle={styles.tab}
      useNativeDriver
    />

In < 1.0.0 version this works for styling but now (1.0.0+) it gives the default blue background, white text etc.

@jungleyu
Copy link

It seems that the api changed from renderHeader to renderTabBar

@arirah
Copy link

arirah commented Dec 16, 2018

Same here for me . Did you solve it ?

@satya164
Copy link
Owner

Hey, I just released a new alpha 2.0.0-alpha.0 of the library. It's rewritten using react-native-gesture-handler and react-native-reanimated addresses a many platform specific bugs and performance problems. The documentation is updated as well.

Please try the new version and see if it addresses your issue. If not, please open a new issue following the issue template.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants