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

Can't change backgroundColor of the app. #2039

Closed
Amin52J opened this issue Jul 15, 2017 · 1 comment
Closed

Can't change backgroundColor of the app. #2039

Amin52J opened this issue Jul 15, 2017 · 1 comment

Comments

@Amin52J
Copy link

Amin52J commented Jul 15, 2017

I'm using react-native-router-flux version 4.0.0-beta.11 and been trying to change the backgroundColor of the app in a variety of methods suggested over the internet but unfortunately none worked and the background is always the default gray color. The things I tried are listed below:

  • passing a function that returns a style to getSceneStyle prop of the Router component
  • passing a style object to sceneStyle prop of the Scene component
  • wrapping the Router component inside a View element and styling the View

I also tried logging something inside the function passed to getSceneStyle prop but doesn't seem to fire.

here's my actual code:

export default class App extends React.Component {
  render() {
    return (
      <Provider store={store}>
        <Router navigationBarStyle={{backgroundColor:theme.primary}}
                barButtonTextStyle={{color:theme.secondary}}
                barButtonIconStyle={{tintColor:theme.secondary}}
                titleStyle={{color:theme.secondary}}>
          <Scene key="root">
            <Scene key="home" component={TodoListApp} title={texts.todoListTitle}/>
          </Scene>
        </Router>
      </Provider>
    );
  }
}
@aksonov
Copy link
Owner

aksonov commented Jul 15, 2017

Looks like duplicate of #2033

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

2 participants