I'm using React Native 0.14.0 to develop an Android application. Currently I'm using the ToolbarAndroid
component to add a toolbar on top of my scene, but it is not kept between scenes. I found that the Navigator
has a navigationBar
property, which can be set to a Navigator.NavigationBar
component, which should include an object dealing with the title and left and right buttons of the navigation bar. See the official example to understand what I mean. As there is little documentation on this part, I have to rely on the example to set the navigationBar
properly.
This Navigator.NavigationBar
is not as powerful as the ToolbarAndroid
, as itdoesn't automatically have space for the logo, for example.
Is there any way to use ToolbarAndroid
with the navigationBar
property of the Navigator
?
Not really. The closest you could probably get is to wrap the ToolbarAndroid in a component and map the navigator left
, right
methods to the onIconClicked
functions. But that defeats the purpose as you are probably most interested in the ToolbarAndroid's UI.
You need to pass a component that will behave something like the Navigator.NavigationBar. If you can drop in a component that will play nice and provide some of the expected props then it'll work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With