React-native-router-flux: Cant change background color

Created on 14 Aug 2017  路  5Comments  路  Source: aksonov/react-native-router-flux

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

Most helpful comment

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>

All 5 comments

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

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

@aksonov worked for me in 4.0.0-beta.28

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>

@kyoyadmoon thanks...u saved my day.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sreejithr picture sreejithr  路  3Comments

sarovin picture sarovin  路  3Comments

llgoer picture llgoer  路  3Comments

VictorK1902 picture VictorK1902  路  3Comments

YouYII picture YouYII  路  3Comments