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

Cant change background color #2232

Closed
gvimlann opened this issue Aug 14, 2017 · 5 comments
Closed

Cant change background color #2232

gvimlann opened this issue Aug 14, 2017 · 5 comments

Comments

@gvimlann
Copy link

Good evening,

I am using the latest version v4 react native router flux in my app. Unfortunately, I could not change the background color of the scene. I tried using sceneStyle={{backgroundColor:'red'}} and style={{backgroundColor:'red'}}, neither of this works. The background is currently in grey color.

Any way to change the color of this?

Thank you

@aksonov
Copy link
Owner

aksonov commented Aug 14, 2017

use cardStyle for Router. I will add support of sceneStyle (now only getSceneStyle as function is supported)

@duguying
Copy link

@aksonov It's useless in 4.0.0-beta.21.

@dwilt
Copy link

dwilt commented Feb 20, 2018

@aksonov worked for me in 4.0.0-beta.28

@kyoyadmoon
Copy link

kyoyadmoon commented Mar 28, 2018

I have tried cardStyle prop in both 4.0.0-beta.27 and 4.0.0-beta.28
cardStyle prop dose not work on Router component, but did work on Stack and Scene
so I wrap Scenes with a root Stack like this

<Router>
  <Stack key="root" cardStyle={{backgroundColor: '#FFF'}}>
    <Scene key="scene1" />
    <Scene key="scene2" />
  </Stack>
</Router>

@sunday58
Copy link

sunday58 commented May 1, 2019

@kyoyadmoon thanks...u saved my day.

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

6 participants