-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 style the Nav Bar ? #160
Comments
@aksonov this would be really helpful for me too. I'm looking to use the Android styles and it seems like a lot less work to do this instead of creating a custom header. Thanks for this project btw... it's perfect! |
You can change navbar background color on
|
@pewh Is this possible with nested Routers? I am trying to have different styled Navigation Bars for different screens. For instance, one screen may have a green navbar and another may have a red navbar. The code below routes correctly, however no style is applied to the navigation bar in the signin route. `< Router>
Apoligies for the bad styling ... I can't figure out how to format it correctly. |
I thank you @pewh ! thanks to you I just discover that I was unable to customize the nav bar due to that overlap, I sometimes successfully customized the nav bar by juggling with the hideNavBar and showNavigationBar attributes.
Please Note, if I change the hideNavBar and showNavigationBar, I get the following outputs:
I can't really understand the difference between hideNavBar and showNavigationBar and their impacts to get the expected output : 1 styled bar with the Screen Title and the Back Button that should appear only when "stacked" screens are handled, not when switching between tabs. Thanks a lot for help |
Hi @thngdude, you can styling navbar on each
or do this if above doesn't work.
Ps: Wrap with triple backtick instead of one backtick ( ` ) to format multiline code. |
Hi @KBLNY, I'm glad I can help your problem 😄
and don't forget to include TabIcon component.
I have not tested it, but it should work. |
Hi guys, any PR about docs improve would be very helpful, thanks. |
@pewh Thanks, I tried your suggestions, and the navbar appears, but no title is present and the styling is the default style. |
Thanks @pewh I got it to work. However, to get Android styles and transitions is becoming rather difficult. This seems like the underlying ex-navigator issue expo/ex-navigator#24 would solve this. Ideally if the user is on an Android and the It seems like ** edit ** Digging deeper the built in |
3.0 is released with improved docs. Closing it for now, because it is for outdated version (2.x) |
@alirezavalizade I would use the StatusBar component on the page that has the dark backgrounds: |
How would one remove, what looks like about 20 pixels of padding, on the top of the NavBar if your app does not display the Status Bar? I've tried top: -10, and marginTop: 0, etc. But it doesn't seem to correctly alignItems (back button and title) to the center of the row. |
is it possible to add custom buttons to the navbar at all? |
Well I had made one plugin for that it is use full to achieve what you want. https://github.com/BhavanPatel/react-native-navbar-color |
@BhavanPatel, is it working for iOS? |
@alexpavlovaskblue Yes, Please check Readme of plugin. Thanks |
The other possible way to change background color of of Status Bar and Navigation Bar of Android Device is through and you may check the answer link below |
Hi,
I successfully change the background color of the nav bar in the "master" branch, but not in the "2.0" branch.
Any help ?
Thanks
The text was updated successfully, but these errors were encountered: