KBLNY / react-native-message-bar

A notification bar alert displayed at the top of the screen for react-native
MIT License
442 stars 125 forks source link

How to show the message bar above navigation bar? #16

Open iphonic opened 8 years ago

iphonic commented 8 years ago

Hi , I was trying to show the message bar above the navigation bar I have, but it doesn't work with a navigation bar appearing. How to achieve this?

Can you please help.

Thanks.

ararog commented 8 years ago

Maybe an offset prop can fix this. Will try this approach this weekend and submit a PR.

ararog commented 8 years ago

@iphonic try set viewTopOffset prop, I believe that's the only way to go, for me place below navigationbar is enough.

KBLNY commented 8 years ago

Hey there, I suppose you use react-native-router-flux. Actually you can't because the MessageBar is attached to the current view and the navigation bar is at a higher level. Even if you try viewTopOffset: -NavBarHeight you will make the alert bar displayed under the navigation bar. I'm working on a redux implementation and will surely provide a way to do this in the next release. Any ideas are welcome :)

jaison-x commented 7 years ago

Hello @KBLNY ,

Can not work with react-native-router-flux or is it not only possible to put it above the navbar? I am trying to use with react-native-router-flux and I am getting problems.

Thank you.

nonotest commented 7 years ago

works fine with RNRF here.

herarya commented 6 years ago

im using with react-native-router-flux works fine

screen shot 2018-02-07 at 11 53 10

dustturtle commented 6 years ago

@herarya would you please show a demo?

herarya commented 6 years ago

@dustturtle i think you just follow example https://github.com/aksonov/react-native-router-flux/blob/master/Example/Example.js https://github.com/aksonov/react-native-router-flux/blob/master/Example/components/MessageBar.js

dustturtle commented 6 years ago

got this done. Thanks a lot. @herarya