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

Change the navbar Background color Dynamically #2944

Closed
GopiKrishna10 opened this issue Mar 16, 2018 · 2 comments
Closed

Change the navbar Background color Dynamically #2944

GopiKrishna10 opened this issue Mar 16, 2018 · 2 comments

Comments

@GopiKrishna10
Copy link

Version

Tell us which versions you are using:

  • "react-native-router-flux": "^4.0.0-beta.28",
  • "react-native": "0.52.0",

HI @Blapi , @aksonov

I need to change the Navbar Background color with the prop navigationBarStyle Dynamically. I tried the code like Action.refresh({navigationBarStyle:{backgroundColor:'red'}).but its not reflecting on navbar.How can I change the Background color for nav bar from my component. I don't have much functionality for writing the custom navBar

Expected behaviour

I Think using this Action.refresh({navigationBarStyle:{backgroundColor:'red'}) code.Color has to change

Actual behaviour

It's not changing the backgroundColor for my screen.

Sorry for bad English.

@Blapi
Copy link
Collaborator

Blapi commented Mar 16, 2018

Not supported

#2639

@Blapi Blapi closed this as completed Mar 16, 2018
@fcustodiof
Copy link

fcustodiof commented Apr 11, 2019

I found this solution using react navigation

this.props.navigation.setParams({headerStyle:{backgroundColor:this.props.vehicle.pinColor}})

here the docs https://reactnavigation.org/docs/en/headers.html

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

3 participants