Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set tab bar activeBackgroundColor #2260

Closed
isAlmogK opened this issue Aug 18, 2017 · 1 comment
Closed

How to set tab bar activeBackgroundColor #2260

isAlmogK opened this issue Aug 18, 2017 · 1 comment

Comments

@isAlmogK
Copy link

"react-native-router-flux": "4.0.0-beta.14",

I'm trying to set my tab bar activeBackgroundColor but noting is working

I have the following tabBarStyle={styles.tabBarStyle} which works for the background but the following did not work activeBackgroundColor={styles.tabBarSelectedStyle} tabBarOptions={{activeBackgroundColor: '#FFF'}}

Here is my code

<Scene key="tabBar" tabs lazy tabBarStyle={styles.tabBarStyle} activeBackgroundColor={styles.tabBarSelectedStyle} tabBarOptions={{activeBackgroundColor: '#FFF'}}>
                                <Scene key="tab1" title="Home" tabBarLabel="Home" icon={HomeTabIcon}>
                                    <Scene key='Home' component={Home} title='Home' initial={true}  panHandlers={null} activeBackgroundColor={styles.tabBarSelectedStyle}/>
                                    <Scene key='Teams' component={Teams} title='Teams' initial={false} />
                                    <Scene key='Sync' component={Sync} title='Syncing Data' initial={false}  hideTabBar hideNavBar />
                                </Scene>
                                <Scene key="tab2" title="Photos" tabBarLabel="" icon={PhotosTabIcon}>
                                    <Scene key='Photos' component={Photos} title='Photos' back backTitle='Back' initial={false} />
                                    <Scene key='SinglePhoto' component={SinglePhoto} title='Photo' back backTitle='Back' initial={false} />
                                    <Scene key='PhotoUpload' component={PhotoUpload} title='Upload Photo' back backTitle='Back' initial={false} />
                                </Scene>
                            </Scene>
@isAlmogK
Copy link
Author

I have it working closing out, for anyone else this is how you do it

<Scene key="tabBar" tabs lazy showLabel={false} inactiveBackgroundColor={'#30393F'} activeBackgroundColor={'#25abf9'}>

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

No branches or pull requests

1 participant