monterosalondon / react-native-parallax-scroll

Parallax scroll view for react-native
MIT License
555 stars 62 forks source link

How to combine ParallaxScroll component with react-navigation's TabNavigator #16

Closed zoranmarjanovic closed 6 years ago

zoranmarjanovic commented 6 years ago

I would like to have TabNaivagator inisde ParallaxScroll and have when user scrolling up have sticky header which is TabNaivagator header. Any help?

z4o4z commented 6 years ago

Hi @zoranmarjanovic! Which component do you use for navigation? https://github.com/react-navigation/react-navigation or https://github.com/happypancake/react-native-tab-navigator

zoranmarjanovic commented 6 years ago

Sorry for less informations.

Yes, I use the first one https://github.com/react-navigation/react-navigation

z4o4z commented 6 years ago

@zoranmarjanovic looks like TabNaivagator doesn't support render header in the different place(outside the TabNaivagator view). But you can emulate it, try to create CustomTabView and use it with StackNaivagator, so the CustomTabView will be in the ParallaxScrollHeader and StackNaivagator will be as ParallaxScroll child component. Does it make sense?

zoranmarjanovic commented 6 years ago

Yes, I figured out that. Your approach totally make sense, but I have tried with limited height and disabling / enabling scroll on ParallexView and ScrollView inside the TabNavigator and seems to be working, thanks anyway for quick response

z4o4z commented 6 years ago

You are welcome :)

ashokkumar88 commented 6 years ago

@zoranmarjanovic can u please show an example code how you achieved this. I am struggling with this. Please help