KBLNY/react-native-message-bar

How to show the message bar above navigation bar?

Opened this issue · 9 comments

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.

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

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

KBLNY commented

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 :)

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.

works fine with RNRF here.

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

screen shot 2018-02-07 at 11 53 10

@herarya would you please show a demo?

got this done. Thanks a lot. @herarya