zobeirhamid / react-native-scrollable-navigation-bar

Respecting navigation bar for scrolling screens.
https://zobeirhamid.github.io/react-native-scrollable-navigation-bar/
MIT License
266 stars 29 forks source link

Navigation Bar height #2

Closed hirbod closed 5 years ago

hirbod commented 5 years ago

Hi @zobeirhamid first of all a BIG thank you for this incredible component. Finally a well done and useable collapsible header bar.

Is there any chance to make the height of the navigation bar editable? Currently, it doesn't look perfect on iPhone X, i need to adjust padding and height a bit.

While I can add a paddingTop to "titleStyle", it still doesn't fit perfectly. Looks like the height is fixed in "constants.js".

Any chance to make this editable or any other advice?

IMG_5228

hirbod commented 5 years ago

IMG_5229

and here another issue related to the fixed height

zobeirhamid commented 5 years ago

Tagchen!

Happy to hear that you like the component. I fixed the issue with iPhone X just now, it should look now better. Currently, the NavigationBarComponent is not really customizable, but you still are able to give the ScrollableNavBar your own NavigationBarComponent. You can also set a navigationBarHeight, but I wouldn't recommend in doing so because you cannot customize the paddingTop to it. But adding the feature to be able to customize the padding shouldn't be so hard and I would really appreciate any contribution. Danke.

hirbod commented 5 years ago

I worked my way around using another approach:

navigationBarHeight={IS_ANDROID ? 80 : 50}

And on titleStyle is set a -10 for the top property. Without adjusting the height, the statusbar will look just too big. Auch dir danke für den fix :)